Please see below pseudo code
//Single or multiple Producers produce using below method void Produce(object itemToQueue) { concurrentQueue.enq
You would use BlockingCollection. There's an example in the documentation.
That class is specifically designed to make this trivial.