Hacker News new | ask | show | jobs
by alfanerd 322 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...
1 comments

Yes, but now you have contention on the queue.
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...