Apple Posts Developer Tutorial on Threading

· by · News

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 doesnit require an ADC membership to view.

John Martellaro

John Martellaro

John Martellaro was born at an early age and began writing about computers soon after that. He is a former U.S. Air Force officer and has worked for NASA, White Sands Missile Range, Lockheed Martin Astronautics, the Oak Ridge National Laboratory and Apple. At Apple he worked as a Senior Marketing Manager, a Federal Account Executive and a High Performance Computing manager. His interests include skiing, chess, science fiction and astronomy. You can follow John on Twitter at twitter.com/jmartellaro.

Sign Up for the Newsletter

Enter a valid email address

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday.

Adding to list…

No Comments

Log-in to comment