Listing 13: The Reader Thread // Wait for the queue-ready signal QueueReady.WaitOne(); // Retrieve data from the queue int data = (int)Power2Queue.Dequeue(); // Indicate that the queue is now available QueueReady.Set();