public static class ThreadPoolExecutor.CallerRunsPolicy extends java.lang.Object implements RejectedExecutionHandler
execute method,
unless the executor has been shut down, in which case the task
is discarded.| Constructor and Description |
|---|
ThreadPoolExecutor.CallerRunsPolicy()
Creates a
CallerRunsPolicy. |
| Modifier and Type | Method and Description |
|---|---|
void |
rejectedExecution(java.lang.Runnable r,
ThreadPoolExecutor e)
Executes task r in the caller's thread, unless the executor
has been shut down, in which case the task is discarded.
|
public ThreadPoolExecutor.CallerRunsPolicy()
CallerRunsPolicy.public void rejectedExecution(java.lang.Runnable r,
ThreadPoolExecutor e)
rejectedExecution in interface RejectedExecutionHandlerr - the runnable task requested to be executede - the executor attempting to execute this task