Producer / Consumer with Bounded Buffer
As before, the consumer can take when the number of data items in the buffer is at least one.
This time, the producer can append when the number of empty cells in the buffer is at least one.
Can you modify the previous code to accommodate a bounded buffer ?
The trick is to realize that the consumer actually produces empty cells!