Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Fair points, but they are good to get started and can later be replaced with a proper log e.g. Kafka and a worker thread :)


If that's a "proper" replacement, then I think you want a queue, not an agent.


Like 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!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: