In this chapter, you will learn about:
Threads and multithreading.
How to write and manage threads with locks in iPhone applications.
General concepts related to the multithreading environment.
Safety: The program should generate the expected result.
Liveness: The expected result has to be finally generated at some point.
Performance: The expected result has to be quickly generated.
Knowing when to use threads.
Knowing many different alternatives between threads and some other built-in solutions provided by Apple. Today’s computing devices have more and more processors. The iPhone is no exception; sooner or later, the iPhone will have multiprocessors; in fact, Android already had some devices with dual-core. Therefore, the need to know how to exploit the multiprocessor system is increasing. This is just one of the reasons for learning about multithreading. Thread canals help you with other issues such as asynchronous code, file and network I/O, or slow calculating processes.