June 2006
Intermediate to advanced
1344 pages
42h 52m
English
In a producer/consumer relationship, the producer portion of an application generates data and the consumer portion of the application uses that data. In a multithreaded producer/consumer relationship, a producer thread calls a produce method to generate data and place it in a shared region of memory called a buffer. A consumer thread calls a consume method to read the data. If the producer wishes to put the next data in the buffer but determines that the consumer has not yet read the previous data from the buffer, the producer thread should call Wait. Otherwise, the consumer would never see the previous data, which would be lost to that application. When the consumer thread ...
Read now
Unlock full access