February 2014
Beginner
1248 pages
62h 25m
English
• You cannot make assumptions about the relative speeds of concurrent threads.
• A bounded buffer (p. 995) can be used to minimize the amount of waiting time for threads that share resources and operate at the same average speeds. If the producer temporarily produces values faster than the consumer can consume them, the producer can write additional values into the extra buffer space (if any are available). If the consumer consumes faster than the producer produces new values, the consumer can read additional values (if there are any) from the buffer.
• The key to using a bounded buffer with a producer and consumer that operate at about the same speed is to provide the buffer ...
Read now
Unlock full access