You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method is used for shutting down the lifecycle executor (of which there are currently two types: runtime startup and runtime shutdown), but uses configuration options that are supposed to control the maximum duration of individual shutdown hooks:
privatevoidshutdownGracefully(ExecutorServiceexecutor) {
executor.shutdown();
try {
longtimeout = config.getShutdownHookTimeout().toMillis();
booleanterminated = executor.awaitTermination(timeout, TimeUnit.MILLISECONDS);
if (!terminated) {
LOGGER.warn("Failed to shutdown executor in {} millis", timeout);
}
} catch (InterruptedExceptione) {
// ignoreLOGGER.warn("Interrupted while waiting for shutdown", e);
executor.shutdownNow();
}
}
The text was updated successfully, but these errors were encountered:
Also need to move the enclosing try{} catch (InterruptedException e) {} block to the calling bt.runtime.BtRuntime.runHooks method to make sure that the exception is not accidentally swallowed with runHooks continuing to wait for something.
This method is used for shutting down the lifecycle executor (of which there are currently two types: runtime startup and runtime shutdown), but uses configuration options that are supposed to control the maximum duration of individual shutdown hooks:
The text was updated successfully, but these errors were encountered: