Can I use POSIX threads in iPhone OS?
Are these available for iPhone OS? The Threading Programming Guide mentions these but does not say if they are also releva开发者_开发百科nt on iPhone OS.
Yes. pthreads are available on the iPhone. However, Cocoa provides some nice abstractions for multi-threading applications.
Checkout Concurrency Programming Guide for the iPhone and their description of NSOperation
, as a started.
If you really need threading, you can use the NSThread
, which is basically an OO wrapper around pthreads. You should read the Threading Programming Guide, to understand how threading works in iPhone.
精彩评论