Julien Sulpis @jsulpis.dev · Nov 19

And then there is the SharedArrayBuffer. Like the ArrayBuffer, this is a raw binary data buffer, but this one can be shared between worker threads ! The main thread for instance can share binary data with a worker thread. Both threads can access (read/write) this buffer.

0 likes 1 replies

?

Replies

Julien Sulpis · Nov 19

But this can cause issues with concurrent access. That's why... the Atomics namespace provides static functions to make atomic operations. A worker thread can write into a shared buffer, then wake another thread that was waiting for an update.