Skip to Main Content
The Joy of Clojure, Second Edition
book

The Joy of Clojure, Second Edition

by Michael Fogus, Chris Houser
May 2014
Intermediate to advanced content levelIntermediate to advanced
520 pages
17h 23m
English
Manning Publications
Content preview from The Joy of Clojure, Second Edition

Chapter 11. Parallelism

This chapter covers

  • When to use futures
  • When to use promises
  • Parallel operations
  • Introduction to reducer/fold

Typically, parallel tasks work toward an aggregate goal; and the result of one task doesn’t affect the behavior of any other parallel task, thus maintaining determinacy. Whereas in the previous chapter we stated that concurrency was about the design of a system, parallelism is about the execution model. Although concurrency and parallelism aren’t quite the same thing, some concurrent designs are parallelizable. Recall that in the previous chapter we showed an illustration of a concurrent work queue design featuring a producer and two consumer threads (see figure 11.1).

Figure 11.1. The concurrent design ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Living Clojure

Living Clojure

Carin Meier
Clojure in Action, Second Edition

Clojure in Action, Second Edition

Amit Rathore, Francis Avila
Getting Clojure

Getting Clojure

Russ Olsen
Programming Clojure, 3rd Edition

Programming Clojure, 3rd Edition

Alex Miller, Stuart Halloway, Aaron Bedra

Publisher Resources

ISBN: 9781617291418Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link