private static void Consume(IRingBuffer <int> buffer, ref bool shouldStop) { while (!shouldStop || !buffer.IsEmpty()) { if (!buffer.IsEmpty()) { Thread.Sleep(500); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Consume data[{0}] on Thread [{1}]", buffer.Dequeue(), Thread.CurrentThread.Name); Console.ResetColor(); } } }