From Agents to Executors, this guide covers all of the important concepts for concurrent programming in Clojure. It includes a comprehensive catalog of concurrency primitives.
Pragmatic and in-depth guides to a topic.
Parts of courses on specific topics
In this lesson, things start getting serious. You’ve hired more workers, now they need to work together to build cars. And the common technique in factories is to use an assembly line. Learn to create patterns of communication between your processes using channels.
This lesson addresses some issues that came up with the switch to conveyor belts. How do we tell everyone to stop working when the trucks are loaded and ready to ship? We don’t want them to keep building cars. Learn about how to close channels so that they don’t accept any more work.
In this lesson, we finally consolidate the work and improve scalability by analyzing the diagram of our assembly line.
Central to any modern factory are conveyor belts. In this lesson, you learn about buffers, which are like conveyor belts between go blocks.
In this lesson, we look at some problem areas where we could experience deadlock – our workers waiting forever. Looking at the problem in a picture makes it clear what we can do.
Java provides a library called ExecutorService. It’s a thread pool fed by a queue. You send it tasks (functions) and you get back Futures with your answers.
PDFs, code, and other downloads to help you learn
Code to accompany The Ultimate Guide to Clojure Concurrency and the Clojure Concurrency Course. It’s example code for a variety of concurrency primitives.