the concept of a process : Each process is an application, has a separate memory space, in general, an application exists a process, but there are multiple processes (such as the browser)
Threads in the same process share memory and resources in memory.
Multi-Threading concept: Each program has a main thread that invokes the main function to start
The main thread's life cycle is bound to the application, and the main thread stops when the program exits.
Multithreading technology indicates that using multithreading can increase CPU utilization and prevent the main line from being blocked.
Any task that is likely to clog the main line is not placed on the mainline call execution ( access network )
Note: The use of threads is not uncontrolled, only the main line is called the ability to directly modify the UI
Advantages and disadvantages of iOS three multithreading technologies:
1.NSThread:
Pros:nsthread than the other two lightweight, easy to use
Disadvantages : You need to manage your thread's lifecycle, thread synchronization, locking, sleep, and wake up. Thread synchronization has some overhead in locking the data
2.NSOperation:
No need to care about thread management, data synchronization, you can focus on what you need to do
Nsoperation is an object-oriented
3.GCD
The Grand Central Dispatch is a multi-core programming solution developed by Apple. Ios4.0+ is an efficient and powerful technology that replaces Nsthread, Nsoperation
GCD is based on the C language
iOS Learning--Multithreading and GCD understanding