Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Clojure Reactive Programming
  • Toc
  • feedback
Clojure Reactive Programming

Clojure Reactive Programming

By : Leonardo Borges
4.3 (13)
close
Clojure Reactive Programming

Clojure Reactive Programming

4.3 (13)
By: Leonardo Borges

Overview of this book

If you are a Clojure developer who is interested in using Reactive Programming to build asynchronous and concurrent applications, this book is for you. Knowledge of Clojure and Leiningen is required. Basic understanding of ClojureScript will be helpful for the web chapters, although it is not strictly necessary.
Table of Contents (13 chapters)
close
11
B. Bibliography
12
Index

Futures and blocking IO


The choice of using ForkJoinPool for imminent is deliberate. The ForkJoinPool—added on Java 7—is extremely smart. When created, you give it a desired level of parallelism, which defaults to the number of available processors.

ForkJoinPool then attempts to honor the desired parallelism by dynamically shrinking and expanding the pool as required. When a task is submitted to this pool, it doesn't necessarily create a new thread if it doesn't have to. This allows the pool to serve an extremely large number of tasks with a much smaller number of actual threads.

However, it cannot guarantee such optimizations in the face of blocking IO, as it can't know whether the thread is blocking waiting for an external resource. Nevertheless, ForkJoinPool provides a mechanism by which threads can notify the pool when they might block.

Imminent takes advantage of this mechanism by implementing the ManagedBlocker (see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ForkJoinPool...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete