Thinking in Processes
Until now you’ve seen how to use cores for one-time asynchrony (futures and promises), coarse-grained task parallelism, and fine-grained data parallelism. Sometimes, though, we’re interested in concurrency rather than parallelism—that is, the ability to design our program as a set of concurrent threads of execution. Inevitably, we’ll also want to convey values between these threads of execution, not just a single time but as a series of values over time.
The core.async library was created as an answer to these needs. It was originally conceived as part of Clojure itself but was ultimately released as an independent library to allow for more-rapid evolution than the core language. The core.async library provides two central ...
Get Clojure Applied now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.