Since Java 1.5, java.util.concurrent
- Java Concurrency - Atomic Variable Access: A small toolkit of classes that support lock-free thread-safe programming on single variables.
Future (Results and Execution cancelation)
- returns the results of a function, allows determination of whether execution has completed,
- and provides a means to cancel execution.
A RunnableFuture is a Future that possesses a run method that upon (during ?) execution, sets its results.
- ScheduledThreadPoolExecutor additionally schedule commands to run after a given delay, or to execute periodically.
The Executor Service are normally created and configured using Executors factory methods. The Executors class provides:
- factory methods for the most common kinds and configurations of Executors,
- as well as a few utility methods for using them.
- ForkJoinPool: Class ForkJoinPool provides an Executor primarily designed for processing instances of ForkJoinTask and its subclasses. These classes employ a work-stealing scheduler that attains high throughput for tasks conforming to restrictions that often hold in computation-intensive parallel processing.