ForkJoinTask
ForkJoinTask is an abstract class in the Java concurrency framework that represents a unit of work in the Fork/Join framework. It is designed for tasks that can be recursively decomposed into subtasks, executed in parallel, and combined to produce a result. The class serves as the common base for tasks executed by a ForkJoinPool, the specialized executor that supports work-stealing to maximize processor utilization.
Two concrete specializations are RecursiveTask<V>, which computes and returns a value of type V, and RecursiveAction,
ForkJoinTask implements Future<V> and RunnableFuture<V>, allowing traditional Future operations such as get() and cancel(). It also
Usage patterns emphasize small, independent subtasks with minimal shared state. Because of the overhead, it's best