wait method
The calling code calls this method to wait for the signal.
If the event is in the non-signaled state, the calling code blocks.
If the event is in the signaled state, the calling code continues
execution.
Implementation
Future<void> wait() {
if (_isSet) {
return _ResetEvent._void;
}
return _queue.enqueue();
}