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