4 ms·
No. I've introduced state, but no shared state; the "next batch" var is local to the actor and not shared. Critically, the only one who updates the variable is
by morsch 4y ago
No. I've introduced state, but no shared state; the "next batch" var is local to the actor and not shared.
Critically, the only one who updates the variable is the actor itself in its thread; it could be a plain list, and not a concurrent queue as it might be in a different multiple producer/single consumer architecture.
PS -- I'll add that in Akka itself, the actor's mailbox, in which messages accumulate until the actor next gets allotted a thread, is exactly a kind of concurrent queue, at least in its default implementation.