public final class ExecutorServiceHelper extends Object
| Constructor and Description |
|---|
ExecutorServiceHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
shutdownAndAwaitTermination(ExecutorService pool) |
static boolean |
shutdownAndAwaitTermination(ExecutorService pool,
long timeoutMillis)
The following method shuts down an
ExecutorService in two
phases, first by calling shutdown to reject incoming tasks,
and then calling shutdownNow, if necessary, to cancel any
lingering tasks. |
public static boolean shutdownAndAwaitTermination(ExecutorService pool)
public static boolean shutdownAndAwaitTermination(ExecutorService pool, long timeoutMillis)
ExecutorService in two
phases, first by calling shutdown to reject incoming tasks,
and then calling shutdownNow, if necessary, to cancel any
lingering tasks.Copyright © 2023. All rights reserved.