arunpandianp commented on code in PR #35901:
URL: https://github.com/apache/beam/pull/35901#discussion_r2377277484


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/harness/SingleSourceWorkerHarness.java:
##########
@@ -66,6 +67,7 @@ public final class SingleSourceWorkerHarness implements 
StreamingWorkerHarness {
   private final Function<String, Optional<ComputationState>> 
computationStateFetcher;
   private final ExecutorService workProviderExecutor;
   private final GetWorkSender getWorkSender;
+  @Nullable private WindmillStream.GetWorkStream getWorkStream;

Review Comment:
   Thanks for the explanation. I think there is a happens before edge between 
the workProviderExecutor threads shutdown and getWorkStream.shutdown(), so it 
works. It is subtle though. Can we make getWorkStream an atomic reference to 
make sure we don't violate the thread safety by mistake? 



-- 
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