Allow Atomics.wait on the main browser thread. Atomics.wait currently throws on the main thread, which nudges developers towards using spinlocks instead. Spinlocks are worse for performance and power usage than Atomics.wait, so this change allows developers to write more efficient multithreaded applications.
Atomics.wait currently throws unconditionally on the main thread. This was originally meant to nudge developers toward architectures (e.g. message passing with postMessage or lock-free data structures) that do not risk blocking the main thread, but in practice it has just pushed developers to use spinlocks instead. Spinlocks are worse than Atomics.wait for performance and power consumption, so allowing Atomics.wait on the main thread will help developers create more efficient multithreaded applications.