Multiple Monitor.Wait
invocations access the same synchronization object. Therefore, the chance for multiple semantically different wait conditions is high.
If multiple threads are awaiting different states (i.e., semantically different wait conditions), chances are high that Monitor.Pulse
signals the wrong thread.
Replace the Monitor.Pulse
invocation with Monitor.PulseAll
.