The Unfairly Unknown ForkJoinPool

The Bored Dev
The Startup
Published in
9 min readJul 12, 2020

--

We are all well aware of all the fancy new features that JDK 8 brought to us and probably it’s hard to find a Java developer that doesn’t know what Java Streams, Lambdas or CompletableFutures are. So all these nice features came a few years back with JDK 8, but what happened a bit earlier with the release of JDK 7?

If we check the new features in the JDK 7 release, it’s still a bit difficult to spot one of the most important new features introduced in this release.
We’ll have to go under “Concurrency utilities” section to actually see what we’re looking for.

We’re of course talking about the release of the ForkJoinPool framework in JDK 7, something that in my opinion didn’t get the publicity that it actually deserved; I’d say that many of the Java developers nowadays are a bit unfamiliar with what ForkJoinPool is and where is used.

In this article we’re going to go over the internals of the ForkJoinPool framework and explain why it’s so important; trying to give some justice to this unfairly treated part of the JDK.

Let’s start then!

Introduction

What is the ForkJoinPool framework then? The ForkJoinPool framework is a fine-grained task execution framework designed for an efficient parallel execution of tasks. As we mentioned earlier, it was introduced as part of JDK 7 release.

Although most of the times we don’t use it explicitly, ForkJoinPool framework is used under…

--

--