O'Reilly logo

Clojure Programming Cookbook by Nicolas Modrzyk, Makoto Hashimoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

On Quasar/Pulsar

Pulsar is a Clojure wrapper for the Quasar library, which is an actor-based programming toolkit for the JVM. When using actor libraries, actors usually map one on one to a thread, and therefore may take more resources than necessary to handle the sometimes simple code they need to process.

Quasar and Pulsar introduce the concept of fibers, or really lightweight processing units, which can send messages to each other. This results in a simple to read and use set of processing units that facilitate asynchronous programming to a new level.

Getting ready

A new project.clj file needs to be slightly updated with dependencies. Also note the java-agent directive that adds Quasar core to the set of runtime instrumentation.

Note that the purpose ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required