The Mac Observer

Skip navigational links

Featured Article: Report: Intel to Release Quad-Core Processors for All-in-Ones (iMacs)

Apple Posts Developer Tutorial on Threading

by , 4:50 PM EDT, June 26th, 2008

Apple posted an article at the Apple Developer Connection (ADC) Website on Thursday entitled: "Managing Concurrency with NSOperation." The tutorial explains techniques that allow developers to make better use of multi-core Macs.

"Recent years have seen an end to the continual rise of processor clock speeds, and a move toward multi-core as the way forward. This trend has implications for software developers, because in order to make use of the extra processing power available in multi-core systems, you have to rewrite parts of your application to work concurrently.

"Even if you do not need that extra number-crunching performance in your app, there are many operations such as downloading files that can be more efficient when performed simultaneously," the tutorial explained.

The key is to avoid the lower level threading APIs and use NSOperation and NSOperationQueue classes.

The article explains: "The NSOperation and NSOperationQueue classes alleviate much of the pain of multi-threading, allowing you to simply define your tasks, set any dependencies that exist, and fire them off."

The tutorial has plenty of code examples and should help any developer get that application pumping on all available cores, especially in the Mac Pro which can have up to eight.

Note: the tutorial is located in the public section of the ADC Website and doesn't require an ADC membership to view.

Observer Comments

Show: Subjects Only | Full Comments
Comment on this Article

Log in | Register | Having Problems? Reset TMO Cookies & Try Again
Username:   Password:   Log me on automatically each visit   

You are not logged in, and this post will appear as "Guest." Log in with your username and password from the TMO forums. If you do not have a username, you can register here.
Please note that guests are limited to including a maximum of two URLs per post.


Post A Comment
  Subject


  Your Comments



Please enter the word exactly as you see it in the image above. Registered users aren't prompted for this. Having trouble reading the image get a new one.


Recent Headlines - Updated Thursday, November 20th, 2008

Thu., 1:00 PM
Bento 2
11:50 AM
Freeway 5.3 Converts Flash to QuickTime for iPhone
11:10 AM
iPodObserver - Rumor: More Labels to Go DRM-free at iTunes Store
10:30 AM
Hot Forum Topic - Mac Security and Drive Encryption
10:00 AM
iPO Review - Tetris
9:55 AM
OmniGraffle 5.1 Beefs Up Visio Compatibility
9:35 AM
iPodObserver - Microsoft Lets Zune Subscribers Keep Some Music
8:45 AM
DiscLabel 5.4 Adds Holiday, Business Templates
8:30 AM
iPO Review - Real Soccer 2009
8:15 AM
OmniFocus 1.5 Adds Multi-Mac Syncing, More
7:35 AM
Apple TV Software Update 2.3 Adds AirTunes Support, More
 

The Mac Observer Reader Specials

  • Special Report: iPhone
  • __________
  • Help TMO Grow
  • Macworld Expo - Hotel Deal
  • Podcast: Mac Geek Gab
  • Podcast: Apple Weekly Report
  • TMO on Twitter!

Apple Stock Quote

  • AAPL: $85.11. Change Today: -1.18.
  • (Prices delayed up to 20 minutes.)
  • Discuss in our Apple Finance Board

Hot Topics

Top Deals From DealsOnTheWeb