views:

2940

answers:

5

I'm just starting to use multithreading and was looking for a good explanation. I'm not sure if there are differences in how multithreading works on Macs and iPhones. Does anyone have a good link to tutorials with example code?

Thanks.

+4  A: 

Here's a simple, but complete example: http://softpixel.com/~cwright/programming/threads/threads.cocoa.php

and a related StackOverflow question:
http://stackoverflow.com/questions/830218/nsoperation-on-the-iphone

Robert Harvey
+4  A: 

Don't forget the official documentation from Apple: Threading Programming Guide

You will find complete explanations and example code.

Thomas
+1  A: 

Once again, if I may promote my iPhone development course, I had a class devoted to multithreading last semester, covering basic threading, locking, dealing with the UI on the main thread, and NSOperationQueues, for which the class notes can be found here. This fall semester that same class will be dominated by Grand Central Dispatch.

The video for the class can be downloaded for free from iTunes U.

Brad Larson
A: 

A good and short tutorial on NSInvocationOperation is:

http://www.switchonthecode.com/tutorials/loading-images-asynchronously-on-iphone-using-nsinvocationoperation

Olof