Callables & Futures
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 Callable Interface
The Future Interface
FutureTask
An Example

 

The Limitations of Runnable

The Runnable interface looks like this (minus comments, etc.):

public interface Runnable 
{
    public void run();
}

which means that it has some limitations:

  • you can pass no parameters to the thread
  • the thread cannot return a value
  • the thread may not throw a checked exception.
 
The page was last updated February 19, 2008