bvolpato commented on code in PR #40507:
URL: https://github.com/apache/beam/pull/40507#discussion_r4449687727


##########
sdks/python/apache_beam/transforms/async_dofn.py:
##########
@@ -209,9 +212,25 @@ def setup(self):
         AsyncWrapper._items_in_buffer[self._uuid] = 0
 
   def teardown(self):
-    """Forwards to the wrapped dofn's teardown method."""
+    """Waits for this instance's work before tearing down the wrapped dofn."""
+    if self._use_asyncio:

Review Comment:
   Added both in ae890e8921, with a test. This does not skip a real wait: 
`reset_state()` stops the loop and joins its thread, and `setup()` starts the 
loop, so without a loop no work of this instance can still be running.



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