You've probably mastered the basic concurrency primitives in Clojure. You know just when you need an Atom, how to do transactional updates with Refs, and can do some interesting tricks with Agents. Are you ready to go to the next level? core.async is that.

In 2013, the Clojure team introduced core.async, an implementation of Communicating Sequential Processes for Clojure. It is a powerful, easily reasoned abstraction for writing highly concurrent code. It works in both Clojure and ClojureScript.

Want this course?

Team License

$499
  • HD Download
  • Watch Online
  • Lifetime Access
  • For your company

Download License

$75
  • HD Download
  • Watch Online
  • Lifetime Access
  • For an individual

Online License

$48
  • Watch Online
  • Lifetime Access
  • For an individual

Membership

$49/mo
  • HD Downloads
  • Watch Online
  • Full access
  • All Content
  • For an individual
Get access

Love it or leave it guarantee

If you don't learn as much from this course as you thought, just ask for a refund within 30 days and I'll give you your money back.

Extra Resources

Register for a free account or log in to access these resources.

  • Clojure core.async Reference Sheet

    Overwhelmed by the number of functions in Clojure core.async? This reference sheet shows you just the essentials in an easy-to-follow format.

Clojure core.async

Lessons

Video time: 01h25m

0 / 11

The Factory
  • 5 min

Chapter 1 introduces you to Jennifer and Mark. Jennifer owns a toy factory and Mark builds toy cars. You'll begin to decompose a sequential process into the steps that will execute concurrently.

Hiring (Increasing Concurrency)
  • 8 min

Chapter 2 is where you get to work and start hiring more workers. You learn about go blocks, the powerful macro that enables core.async. You'll make several go blocks, see how they work, and start to make the process of building cars concurrent.

Assembly Line (Coordinating Between Processes)
  • 14 min

Chapter 3 is where 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.

Conveyor Belts (Communicating using Channels)
  • 5 min

Central to any modern factory are conveyor belts. In Chapter 4, you learn about buffers, which are like conveyor belts between go blocks.

Closing Shop (Stopping Processes)
  • 7 min

Chapter 5 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.

Reducing Waste (Optimization)
  • 7 min

In Chapter 6, the assembly line is shaping up. Now Jennifer is trying to make it more efficient. We begin lookin at it at a high level and eliminating wasted work.

Deadlock (When No One Can Work)
  • 8 min

In Chapter 7, 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.

Consolidate (Scaling the right jobs)
  • 4 min

In Chapter 8, we finally consolidate the work and improve scalability by analyzing the diagram of our assembly line.

Pomodoro (Incorporating Timers)
  • 5 min

In Chapter 9, we turn our attention to management. Jennifer is trying out some productivity techniques in her office. Right now, she's implementing Pomodoro. We use core.async to sequence it.

Refactoring (Patterns for go-block components)
  • 7 min

In Chapter 11, we refactor the Pomodoro code by allowing us to turn asynchronous processes into synchronous ones.