The Executor Framework
[ Home ] [ Up ] [ What is MultiThreading? ] [ Threads & Thread Properties ] [ Thread Scheduling and Priority ] [ Types of Threads ] [ Monitors, Synchronization and Deadlocks ] [ Thread Coordination ] [ Communication Between Threads ] [ Threads and Thread Groups ] [ Explicit Locks ] [ Atomic Variables ] [ Blocking Queues ] [ Thread-Safe Collections ] [ Callables & Futures ] [ The Executor Framework ] [ Synchronizers ]

 

The Executor Interface
The ExecutorService Interface
ScheduledExecutorService
The Executors Class
Example

 

So far, we have created our threads by hand.  However, it is common for applications to need a potentially large number of threads, and managing all those threads efficiently is not an easy task.

Instead, it is now recommended that you use a set of interfaces and classes known as the Executor Framework to manage a group of threads known as a thread pool.

A particularly important part of this thread management is to provide support for 'throttling' the number of concurrent threads.  The idea is to provide a facility for limiting the number of threads and instead try to reuse those threads for the requested work.  

The java.util.concurrent package provides a number of interfaces and classes designed for this purpose.

 

The page was last updated February 19, 2008