Listing 12: The Writer Thread // Queue holding powers of two public static Queue Power2Queue = new Queue(); // AutoResetEvent to synchronize access to Power2Queue public static AutoResetEvent QueueReady = new AutoResetEvent(true); ... QueueReady.WaitOne(); Power2Queue.Enqueue(999); // Inform the next consumer that some data is now available QueueReady.Set();