static void Main(string[] args) { var processingQueue = new ProcessingQueue(); Task.Factory.StartNew(processingQueue.Consume); while (true) { var input = Console.ReadLine(); processingQueue.Produce(input); } }