Remix.run Logo
alfanerd 4 days ago

I think you only need one queue per actor? And then one worker per CPU core? I believe that how Erlang does it, and do millions of actors without any issues...

gpderetta 4 days ago | parent [-]

Yes, but now you have contention on the queue.

ramchip 4 days ago | parent [-]

The way Erlang does it is to use buckets so it looks like a single queue to the user code but really is more like multiple queues behind the scene. Scales extremely well. It's certainly not "just moving a pointer to a piece of shared memory" though...

https://www.erlang.org/blog/parallel-signal-sending-optimiza...