proposal-atomics-wait-async icon indicating copy to clipboard operation
proposal-atomics-wait-async copied to clipboard

Note: Return value of `wake` may not accurately reflect waiters woken, if enormous

Open lars-t-hansen opened this issue 8 years ago • 0 comments

More of a note than an issue, I don't see this as a problem for JS.

Background: https://github.com/WebAssembly/threads/issues/72. With this lightweight wait mechanism, it is possible to create a very large number of waiters with modest resource use. On 64-bit systems with 64-bit physical addresses and RAM/swap to back it we can conceivably go past 2^53 waiters. This means the result of wake without a count may not be able to represent the number of woken waiters precisely in its return type, which is Number. To consumers that care, the loss of accuracy will however be detectable (the value is no longer an integer).

lars-t-hansen avatar Oct 20 '17 09:10 lars-t-hansen