This is a Pthread solution to the Producer-Consumer Problem.
For more information about this problem, please refer to [Wikipedia][https://en.wikipedia.org/wiki/Producer%E2%80%93consumer_problem]
By adjusting the predefined value in the code, this program can simulate situations with any number of producers, any number of consumers, and any size of buffer.
Note: This demo program is designed to run forever, manaual operation is required to exit it.