Writing some unit tests for Emscripten, I today realize that Firefox and Chrome behavior differ when one issues a memory.atomic.wait32 on the main thread.
If one issues e.g.
(drop
(memory.atomic.wait32 offset=12
(local.get $0)
(i32.const 0)
(i64.const 135790)
)
)
on the main thread,
- Firefox will raise an exception
"TypeError: waiting is not allowed on this thread"
- Chrome will immediately and silently return without performing the wait
Tried to search through the spec to find the reference for wait instruction at https://webassembly.github.io/threads/core/syntax/instructions.html#syntax-instr-atomic-memory , but was unable to figure out which is the correct behavior, or if both are?
(I am aware of Atomics.waitAsync, this question is not about that, but just about what should happen if one does attempt a memory.atomic.wait32 on the main thread)
Writing some unit tests for Emscripten, I today realize that Firefox and Chrome behavior differ when one issues a
memory.atomic.wait32on the main thread.If one issues e.g.
on the main thread,
"TypeError: waiting is not allowed on this thread"Tried to search through the spec to find the reference for wait instruction at https://webassembly.github.io/threads/core/syntax/instructions.html#syntax-instr-atomic-memory , but was unable to figure out which is the correct behavior, or if both are?
(I am aware of Atomics.waitAsync, this question is not about that, but just about what should happen if one does attempt a memory.atomic.wait32 on the main thread)