arne-alex commented on code in PR #23333:
URL: https://github.com/apache/beam/pull/23333#discussion_r997814844


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java:
##########
@@ -941,14 +958,18 @@ public void addWorkerStatusPage(BaseStatusServlet page) {
   public void stop() {
     try {
       if (globalConfigRefreshTimer != null) {
-        globalConfigRefreshTimer.cancel();
+        globalConfigRefreshTimer.shutdown();
+        globalConfigRefreshTimer.awaitTermination(300, TimeUnit.SECONDS);

Review Comment:
   Done. The code now shuts down the ScheduledExecutorService instances first, 
then awaits termination on all of them.
   
   What do you think about calling .shutdownNow() instead of .shutdown()? This 
would send an interrupt to any Runnable that's currently executing.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to