Class ExecutorShutdown
java.lang.Object
org.occurrent.subscription.internal.ExecutorShutdown
Utility functions for shutting down executor services.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidshutdownSafely(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.
-
Constructor Details
-
ExecutorShutdown
public ExecutorShutdown()
-
-
Method Details
-
shutdownSafely
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.- Parameters:
executorService- The executor servicetimeout- the maximum time to waitunit- the time unit of the timeout argument
-