public static class java.util.concurrent
ThreadPoolExecutor.CallerRunsPolicy


Show All Login
Java SE 6
  
Implements: RejectedExecutionHandler
Contained within: ThreadPoolExecutor

A handler for rejected tasks that runs the rejected task directly in the calling thread of the execute method, unless the executor has been shut down, in which case the task is discarded.

Constructors
public ThreadPoolExecutor.CallerRunsPolicy()
Creates a CallerRunsPolicy.

Methods
public void rejectedExecution(Runnable r, ThreadPoolExecutor e) Details
Executes task r in the caller's thread, unless the executor has been shut down, in which case the task is discarded.
rthe runnable task requested to be executed
ethe executor attempting to execute this task