It sets a state that allows threads to continue execution if they Wait() on it.
If there are already any threads, then one of them will be available, and the state will be immediately established so that it is not installed, so all other threads will continue to be blocked.
If there are currently no draw streams, then the first one to wait will be immediately allowed, but subsequent streams will be blocked.
The same general mechanism is shared by other EventWaitHandle classes, but the automatic thread-reset that is allowed to run is different from ManualResetEvent , hence the names.
The initial state is signaled (allows threads) if true is passed to the constructor and not signaled if false passed, so true is the same as if you called Set() immediately after building when passing false , on the contrary, it coincides with what you called Reset() .
source share