1, Introduction:1.1 iOS has three multithreaded programming techniques, namely:
1., Nsthread
2, Cocoa nsoperation
3. GCD Full Name: Grand Central Dispatch
These three ways of programming from top to bottom, the level of abstraction from low to high, the higher the abstraction of the more simple to use, is also the most recommended for Apple.
1.2 Three ways of having disadvantages are introduced:
Nsthread
Pros: Nsthread than the other two lightweight
Cons: You need to manage your thread's life cycle, thread synchronization. Thread synchronization has a certain overhead in locking data
Cocoa operation
Pros: No need to care about thread management, data synchronization, you can focus on what you need to do.
Cocoa operation related classes are nsoperation, Nsoperationqueue. Nsoperation is an abstract class that uses its subclasses to implement it or to use the two subclasses it defines: Nsinvocationoperation and nsblockoperation. Creates an object of the Nsoperation subclass and adds the object to the Nsoperationqueue queue for execution.
GCD
Grand Central Dispatch (GCD) is a solution for multi-core programming developed by Apple. Can only be used after the iOS4.0 has started. GCD is an efficient and powerful alternative to technologies such as Nsthread, Nsoperationqueue, and Nsinvocationoperation. Now the iOS system has been upgraded to 6, so don't worry about the technology being used.
Evening Update ...
iOS multithreaded programming