Created Saturday 07 September 2013
This problem is one of the small collection of standard, well-known problems in concurrent programming: a finite-size buffer and two classes of threads, producers and consumers, put items into the buffer (producers) and take items out of the buffer (consumers).
A producer must wait until the buffer has space before it can put something in, and a consumer must wait until something is in the buffer before it can take something out.
An inadequate solution could result in a deadlock where both processes are waiting to be awakened.
No backlinks to this page. comments powered by Disqus