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
Remove loop from emscripten_thread_sleep. NFC (#26585)
We have code in the lower level `emscrpeten_futex_wait` that takes care
of splitting up the wait for the main runtime thread.
For normal pthreads I don't see any need to run the message queue
constantly while the thread is sleeping.
As part of this change I found that I had to improve the accuracy of the
timeslicing `emscripten_futex_wait`.
The new code uses an absolute target time, so regardless of how much
time it spends between calls to
`atomic.wait` it still returns at the correct time.
Previously we were assuming that we could call `atomic.wait32` with 1ms
timeout N times to achieve Nms of sleeping, but this doesn't always
hold, for various reasons.
Followup to #26471
0 commit comments