- Added new method `ensure()` which ensures that the calling thread gets a registered pipe pair added for it when called.
- This can be useful if one wants to initialize several threads that should be able to all be notified and wake up on their first call to wait instead of having wait ensure the pipe is created on first call
- Typo fix in comment in `wait(timeval*)`
- Implemented (not yet tested) `wouldWait()` which returns `true` if you would block if you called `wait()`, `false` otherwise
- CLeaned up
Event
- Fixed bug whereby a timeout of `0` would cause issues with our `status` logic that examined the returned value from `select(fd_set*, fd_set*, fd_set*, timeval)`
- Calling `wait(timeval)` will now throw a `SnoozeError` if the call to `read(int, void*, int)` fails (returns something other than the expected `1`-byte count)
- Added an import for the `select(...)` function
- Added wrapper functions which handle the `FD_ZERO` and `FD_SET` macros which ImportC cannot refer to directly
Event
- Cleaned up imports
- `wait()` now calls `wait(Duration)` with a duration of `0`
- Implemented a wait with a timeout, `wait(Duration)` which returns `true` if not timed out and `false` on timeout
- Implemented the underlying `select(...)`-based `wait(Duration)` inside of `wait(timeval)`
- Ensure that whenever you try to construct an `Event` object on windows that it will cause a runtime error
- Renamed the old `notify()` to `notifyAll()`
- Implemented `notify(Thread)` which will wake up an individual thread which is waiting on the event, if the thread never await'd the event atleast hen an error is thrown (this will be made configurable soon)
- Added a `nonFail` boolean (not yet fully implemented - see issue #2) which will allow us to not throw an exception when the thread is not in the store
- The new `notifyAll()` now uses `notify(Thread)` internally
Unit tests
- Updated the first unit test to wait for the threads to both end
- Added a second unit test which tests notifying a `Thread` which never awit'd the `Event` atleast once