February 2014
Beginner
1248 pages
62h 25m
English
We now implement the producer/consumer relationship using Lock and Condition objects to coordinate access to a shared single-element buffer (Figs. 23.20 and 23.21). In this case, each produced value is correctly consumed exactly once. Again, we reuse interface Buffer and classes Producer and Consumer from the example in Section 23.5, except that line 28 is removed from class Producer and class Consumer.
Read now
Unlock full access