Concurrency Utilities Enhancements in Java SE 7 (original) (raw)

Home Page

The fork/join framework, which is based on the ForkJoinPoolclass, is an implementation of the Executorinterface. It is designed to efficiently run a large number of tasks using a pool of worker threads. A _work-stealing_technique is used to keep all the worker threads busy, to take full advantage of multiple processors. See Fork/Join in The Java Tutorials. The directory_<Java home>_/sample/forkjoin/ contains samples that demonstrate the fork/join framework.

The ThreadLocalRandomclass eliminates contention among threads using pseudo-random numbers; see Concurrent Random Numbers.

The Phaserclass is a new synchronization barrier, similar to CyclicBarrier.