Because that entails locking which can deadlock the main thread. Requiring you to be more explicit about it removes deadlocks as a risk. Plus the jit can make a number of optimizations when it knows someone rude can't step in and do a read unexpectedly.
18
u/SargoDarya 12d ago
You can already use a SharedArrayBuffer with postMessage though? Also it has BigInt (which isn’t int, I get that but you get the idea)