public class ExecutorShutdown
extends java.lang.Object
| Constructor and Description |
|---|
ExecutorShutdown() |
| Modifier and Type | Method and Description |
|---|---|
static void |
shutdownSafely(java.util.concurrent.ExecutorService executorService,
long timeout,
java.util.concurrent.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(java.util.concurrent.ExecutorService executorService,
long timeout,
java.util.concurrent.TimeUnit unit)
executorService - The executor servicetimeout - the maximum time to waitunit - the time unit of the timeout argumentCopyright © 2021. All rights reserved.