public class CurrentThreadPoolExecutor
extends java.util.concurrent.ThreadPoolExecutor
Executors.newSingleThreadExecutor() does not
work since the pool is used recursively and the pool thread blocks when
submitting a task to the pool itself.java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
CurrentThreadPoolExecutor()
Creates a new thread pool executing commands by the submitting thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.lang.Runnable command) |
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString