Looking at the code here: https://github.com/emscripten-core/emscripten/blob/main/system/lib/pthread/library_pthread_stub.c#L392-L401 I think it would be better to do something like this: ```js const waitBuffer = new Int32Array(new WebAssembly.Memory({"shared":true,"initial":1,"maximum":1}).buffer); function waitSleep(ms: number): boolean { try { Atomics.wait(waitBuffer, 0, 0, ms); } catch (_) { busySleep(ms); } } ``` Any thoughts?