public class ExecutorShutdown extends Object
| Constructor and Description |
|---|
ExecutorShutdown() |
| Modifier and Type | Method and Description |
|---|---|
static void |
shutdownSafely(ExecutorService executorService,
long timeout,
TimeUnit unit)
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
|
public static void shutdownSafely(ExecutorService executorService, long timeout, TimeUnit unit)
executorService - The executor servicetimeout - the maximum time to waitunit - the time unit of the timeout argumentCopyright © 2022. All rights reserved.