Bridging core.async

Clojure's core.async is one of those Clojure features that makes you love asynchronous programming. While not included in Clojure core, it is straight and easy to put into use and makes Clojure's STM a breeze to use. Unfortunately, most of the examples that can be found on core.async make it a bit hard to see how to connect it and plug things together with the rest of your current code and other frameworks.

This recipe wants to close the gap and help you bring out more core.async code out there.

Getting ready

This recipe is largely based on core.async, but we will use a few other libraries. Here's a sample dependencies section for your project.clj file:

 :dependencies [ [org.clojure/clojure "1.8.0"] [org.clojure/core.async "0.2.374"] ...

Get Clojure Programming Cookbook 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.