Describe the bug
EventImpl::waitImpl(long) adds one to the timeout value. If you specify "INFINITE" which is DWORD(-1)/0xFFFFFFFF then this waits for 0 which is completly unexpected behaviour
To Reproduce
Create an event object on Windows and wait for INFINITE
Expected behavior
When -1 is specifed the wait should blocks until signalled or error, or at the very least it should wait for 0xFFFFFFFF milliseconds!
Proposed Fixes
- Add a constant to Event for infinite
- Add an assert on Win32 that checks if "INFINITE" has been used
- Stop adding 1 to the value.