Current status: toying with Atomics and worker_threads.

This is what I got so far https://codeberg.org/indutny/flux/src/branch/main/lib/flux.mjs

The idea is to have a fast channel of notifying the main thread when a worker thread is available to pick up new work.

I suspect that this is faster than doing postMessage/message for a few reasons:

- It only uses atomics and not uv_async_send (that writes to an fd)
- It does not serialize any data

Now... I need to figure out a way to benchmark it!

flux/lib/flux.mjs at main

flux - TBA

Codeberg.org
Ideally what I want to build on top of this is a shared queue that workers could pick tasks from, but... doing queue with SharedArrayBuffer... is hard.