Reputation: 40329
I am curious about threads on iPhone. Are they easy to establish and to maintain? How does it work on the iPhone? Is it real multithreading?
Upvotes: 4
Views: 10612
Reputation: 21
If you want to develop efficient, smooth-running applications, controlling concurrency and memory are vital. Automatic Reference Counting is Apple's game-changing memory management system, new to Xcode 4.2. Pro Multithreading and Memory Management for iOS and OS X shows you how ARC works and how best to incorporate it into your applications. Grand Central Dispatch (GCD) and blocks are key to developing great apps, allowing you to control threads for maximum performance.
There is lots of books and courses available for it.
Upvotes: 2
Reputation: 1850
I would strongly suggest to have a look at the following documentation from Apple:
For most common concurrent programming operations the use of NSOperation
and NSOperationQueue
both part of Grand Central Dispatch is very easy to implement and will cover most of the operations you need to perform asynchronously including the definition of dependencies between such operations.
Using GCD is simpler that using threads and is going to completely replace them in situations where you don't need real time processing from a parallel thread.
Upvotes: 3
Reputation: 1611
Using Grand Central Dispatch is the best way to multithread on the iPhone, it's not that difficult to implement if you stick to the rules. Check the documentation and programming guides.
Upvotes: 1