These are chat archives for voodooattack/nexusjs
SharedArrayBufferbeforehand to a worker, all I have to do is set some data in a typed array in a web worker.
ArrayBufferin the background.
var SAB = new SharedArrayBuffer(4 * Length); var typedArray = new Float64Array(SAB);
Adding further to that complexity, the main thread of a web page is not allowed to call Atomics.wait because it is not good for the main thread to block. So while workers can communicate among themselves using Atomics.wait and Atomics.wake, the main thread must instead listen for an event when it is waiting, and a worker that wants to wake the main thread must post that event with postMessage.