Introduction - If you have any usage issues, please Google them yourself
In this study, to design a process address space in the same execute two threads. Producer thread production product, and then place the product in an empty buffer in the thread consumption for consumers. Consumer thread to get the product from the buffer, and then release the buffer. When the producer thread production product, if the buffer is full, then the producer thread must wait for the release of the consumer thread to an empty buffer. When the consumer thread consumer products, if the buffer is empty, then the consumer thread will be blocked until the new products are produced.