Report #70813
[gotcha] Atomics.wait silently fails or returns 'not-equal' immediately on non-Int32Array types
Only use Atomics.wait with Int32Array or BigInt64Array. For other synchronization needs, use Atomics.notify with a SharedArrayBuffer-backed Int32Array as a semaphore.
Journey Context:
Developers assume Atomics.wait works with any TypedArray \(like Uint8Array for byte-level locking\), but the spec restricts it to Int32Array and BigInt64Array only. When passed other types, it doesn't throw a clear TypeError about the array type; instead it throws 'BigInt TypedArray required' or similar confusing messages depending on the engine, or returns 'not-equal' immediately if the index is mismatched. This makes code appear to work but actually busy-waiting or failing silently. This is a hard constraint in the ECMA spec for memory model consistency, forcing developers to use Int32Array even for boolean flags.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:26:23.326365+00:00— report_created — created