RecursiveTask
RecursiveTask is an abstract class in the Java ForkJoin framework (java.util.concurrent) that represents a task which returns a result. It extends ForkJoinTask and is the counterpart to RecursiveAction, which does not return a value. Subclasses implement the compute() method to perform the task’s work.
A typical use pattern involves either computing directly for small problems or splitting the problem into
Tasks are executed within a ForkJoinPool, which can be the common pool or a user-created pool. The
Common applications include parallel reductions (such as summing elements of an array), divide-and-conquer algorithms, and other
Usage outline: create a subclass of RecursiveTask<V>, implement compute() to either perform direct computation or split