shunping commented on code in PR #35991:
URL: https://github.com/apache/beam/pull/35991#discussion_r2308797481


##########
sdks/go/pkg/beam/runners/prism/internal/worker/worker.go:
##########
@@ -801,6 +813,24 @@ func (mw *MultiplexW) delete(w *W) {
        delete(mw.pool, w.ID)
 }
 
+// WaitForCleanUp waits until all resources relevant to the job are cleaned up.
+func (mw *MultiplexW) WaitForCleanUp(id string) {
+       const cleanUpTimeout = 60 * time.Second
+       c := make(chan struct{})
+
+       go func() {
+               defer close(c)
+               mw.wg[id].Wait()

Review Comment:
   Done.



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