Fork/join framework: is to be a large task, when necessary, to split (fork) into a number of small tasks (split to No re-disassembly), and then the results of a small task operations to Join summary.
The difference between the fork/join frame and the thread pool
- Work-stealing mode (work-stealing): When a new task is performed, it can split it into smaller tasks, add small tasks to the thread queue, and then steal one from the queue of a random thread and put it in its own queue.
- The advantages of the Fork/join framework in relation to the general thread pool implementations are in the way that the tasks contained therein are handled. In a generic thread pool, a thread is waiting if a task that is being performed by a thread cannot continue to run for some reason. In the Fork/join framework implementation, a sub-problem cannot continue to run because it waits for the completion of another sub-problem. The thread that handles the sub-problem is actively looking for other sub-problems that are not yet running. This approach reduces thread latency and improves performance.
Java Multithreading--Forkjoinpool Branch/merge framework work stealing