Introduction - If you have any usage issues, please Google them yourself
The main problem to solve
(1) MFC interface design
(2) Analog producers and consumers of mutual exclusion
Use (3) The semaphore and mutex
Thread
A thread is the basic unit program run independently of a program by executing multiple threads can improve the utilization of resources in the machine itself, but can also run complete operating multi-tasking, multi-threaded parallel processing can be realized, avoiding a task for a long time CPU time.
Mutex and critical section is very similar, but the use of relatively complex, it can only be implemented in the threads of the same application synchronization, it can also achieve synchronization between different processes, enabling secure sharing of resources.
signal
Semaphore is a change in a certain range of shaping data used to represent a critical resource, a thread to determine their status through the value of the semaphore is d or suspended, it is to coordinate between the various threads run sequentially through sema