Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Clojure for Java Developers

You're reading from  Clojure for Java Developers

Product type Book
Published in Feb 2016
Publisher
ISBN-13 9781785281501
Pages 156 pages
Edition 1st Edition
Languages

Summary


We have checked the core Clojure mechanisms for concurrent programming, as you can see, they feel natural and they build on already existing paradigms, such as immutability. The most important idea is what an identity and value is; we now know that we can have the following values as identifiers:

  • Refs

  • Atoms

  • Agents

We can also get the snapshot of their value with the defer function or the @ shortcut.

If we want to use something a little more primitive, we can use promises or futures.

We have also seen how to use threads, or Pulsar's fibers. Most of Clojure's primitives aren't specific to some concurrency mechanism, so we can use any parallel programming mechanism with any type of Clojure primitive.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}