I could not find anywhere in the core spec or JS API spec that says that waiting on the main browser thread traps. Even the overview does not directly address this except for a code comment in an example saying, Blocking on the main thread is not allowed, so we can't call lockMutex.
For consistency with Atomics.wait in JS, the expected behavior is that executing the wait always traps on the main thread, whether or not the thread would actually have been suspended.
I could not find anywhere in the core spec or JS API spec that says that waiting on the main browser thread traps. Even the overview does not directly address this except for a code comment in an example saying,
Blocking on the main thread is not allowed, so we can't call lockMutex.For consistency with
Atomics.waitin JS, the expected behavior is that executing the wait always traps on the main thread, whether or not the thread would actually have been suspended.