From what I understand, if multiple threads are waiting on a
ManualResetEvent after calling WaitOne(), only one thread is guaranteed
to be signaled when Set() is called on that ManualResetEvent. How do I
ensure that _all_ waiting threads are signaled, without sacrificing any
of the functionality or much of the simplicity of ManualResetEvent?
Example:
SignalingClass:
ManualResetEvent handle = new ManualResetEvent(false);
void SomeRandomMethod() { handle.Set(); }
Thread #1: SignalingClassObject.handle.WaitOne();
Thread #2: SignalingClassObject.handle.WaitOne();