public static class ThreadPoolExecutor.CallerRunsPolicy extends Object implements ThreadPoolExecutor.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(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(Runnable r, ThreadPoolExecutor e)
rejectedExecution in interface ThreadPoolExecutor.RejectedExecutionHandlerr - the runnable task requested to be executede - the executor attempting to execute this taskCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.