Want this course?
Course: core.async Patterns
When work tasks are being produced, we often want to handle them in a thread pool. This is exceedingly easy in core.async. Channels are queues, and we can use the
core.async/thread macro to create threads easily. If each loops through the tasks it gets from the queue, the work can be done in parallel.
Backpressure is incredibly important in a distrubuted environment. Our servers can face more load than they can handle. Web requests are cheaper to produce than to respond to. The best practice when faced with more requests than you can handle is to immediately respond that you can't handle it so that you can continue processing the requests you've already accepted.