You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Thread wait timeouts break on negative, NaN, huge and sub-millisecond values #122
POSIX Semaphore.tryAcquire builds a negative tv_nsec for negative or NaN timeouts and overflows (int) for large ones, so -0.5, NaN, 3e9 and 1e10 throw "Failed to wait for semaphore" (Windows returns false/true). It also reads errno after leaving the GC-free zone.
With a 32-bit time_t, WaitSeconds(3e9) overflows tv_sec and returns after microseconds, so Lock.wait spins at full CPU.
Windows truncates milliseconds instead of rounding up, so tryAcquire(0.0005) does not wait and Lock.wait busy-polls the last millisecond of every timed wait.
Activity
Fix thread wait timeouts for negative, NaN, huge and sub-millisecond …