Introduction to Concurrency in Clojure

By Abhinav Sarkar

Elevator Pitch

Clojue is widely known as a functional programming language. But it has a great support for a variety of concurrency models too.

We’ll explore the various concurrency models and primitives supported by Clojure including threads, agents, STM and core.async goroutines and channels.

Description

Outline of the Session

  1. Introduction
  2. Basics of Concurrency: Threads and Locks
  3. Easy Parallelism: pmap and siblings
  4. Atomic Mutability: Atoms and Non-blocking Algorithms
  5. Just Do It, Later: Futures and Promises
  6. Agents of Change: Agents and Watches
  7. Transactions: Refs and Software Transactional Memory
  8. core.async: go blocks
  9. core.async: channels
  10. core.async: Dataflow Programming
  11. Q&A

Learning Outcome

  • Audience will learn and understand the various methods of implementing concurrency in clojure.
  • Audience will become familiar with pro and cons of different concurrency models.
  • Audience will be able to make right choices when using clojure for implementing concurrent programs.

Target Audience

People who are interested in learning and implementing concurrent programs in clojure.

Prerequisite

Working familiarity with Clojure syntax and basic functions.