© Mark McDonnell 2017

Mark McDonnell, Quick Clojure, https://doi.org/10.1007/978-1-4842-2952-1_8

8. Concurrency

Mark McDonnell

(1)southend-on-Sea, UK

One of the main selling points of Clojure as a functional language is its concurrency mechanisms (of which it has quite a few). In order to understand what concurrency means, we first need to understand the problem space it’s related to and what it means for a program to run tasks concurrently.

A computer process (e.g., an instance of a program running on your computer) has the ability to spawn multiple “threads.” Each thread has the ability to execute it’s own unique set of tasks, and are separate from tasks executing within other threads. But threads spawned from the same process share the same ...

Get Quick Clojure: Effective Functional Programming 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.