Skip to main content

Posts

Showing posts from April, 2017

Java Fork and Join using ForkJoinPool

Java Fork and Join using ForkJoinPool Fork and Join Explained Fork Join The ForkJoinPool Creating a ForkJoinPool Submitting Tasks to the ForkJoinPool RecursiveAction RecursiveTask ForkJoinPool Critique Jakob Jenkov Last update: 2015-02-03         The  ForkJoinPool  was added to Java in Java 7. The  ForkJoinPool  is similar to the  Java ExecutorService  but with one difference. The  ForkJoinPool  makes it easy for tasks to split their work up into smaller tasks which are then submitted to the  ForkJoinPool  too. Tasks can keep splitting their work into smaller subtasks for as long as it makes to split up the task. It may sound a bit abstract, so in this fork and join tutorial I will explain how the  ForkJoinPool  works, and how splitting tasks up work. Fork and Join Explained Before we look at the  ForkJoinPool  I want to explain how the fork and join principle works...