Github user poornachandra commented on a diff in the pull request: https://github.com/apache/twill/pull/2#discussion_r75572272 --- Diff: twill-core/src/main/java/org/apache/twill/internal/TwillContainerLauncher.java --- @@ -177,7 +188,24 @@ protected void doStartUp() { @Override protected void doShutDown() { - // No-op + // Wait for sometime for the container to stop + // TODO: Use configurable value for stop time + int maxWaitSecs = Constants.APPLICATION_MAX_STOP_SECONDS; + try { + if (shutdownLatch.await(maxWaitSecs, TimeUnit.SECONDS)) { + return; + } + } catch (InterruptedException e) { + LOG.error("Got exception while waiting for runnable {}, instance {} to stop", runnable, instanceId); --- End diff -- Done
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---