3 ms·
Agents are effectively atoms jammed next to an unbounded queue or unbounded thread pool, depending on whether you use `send` or `send-off`. In cases where you
by prospero 10y ago
Agents are effectively atoms jammed next to an unbounded queue or unbounded thread pool, depending on whether you use `send` or `send-off`. In cases where you have enough contention to actually need formal serialization, you don't want either of those.
If you have low contention, use an atom. If you have high contention, use atoms and/or pieces of java.util.concurrent.
- j-pb 10y agoFair points, but they are good to get started and can later be replaced with a proper log e.g. Kafka and a worker thread :)
- prospero 10y agoIf that's a "proper" replacement, then I think you want a queue, not an agent.
- j-pb 10y agoLike you said an agent is a atom with a queue bolted onto it when only using send. ;P Btw I think your libraries did the job core.async tries to do a lot better :) and to this date I can't figure out why they didn't received the same amount of attention, so thanks for those!