pabloem commented on a change in pull request #11867:
URL: https://github.com/apache/beam/pull/11867#discussion_r433382446



##########
File path: sdks/python/apache_beam/utils/thread_pool_executor.py
##########
@@ -134,3 +134,12 @@ def shutdown(self, wait=True):
       if wait:
         for worker in self._workers:
           worker.join()
+
+
+class _SharedUnboundedThreadPoolExecutor(UnboundedThreadPoolExecutor):
+  def shutdown(self, wait=True):
+    # Prevent shutting down the shared thread pool
+    pass
+
+
+SharedUnboundedThreadPoolExecutor = _SharedUnboundedThreadPoolExecutor()

Review comment:
       Maybe give it a constant name? `SHARED_THREAD_POOL_EXECUTOR` or 
something like that? To clarify it's an instance, and not a class.
   
   I know we did not do this for `MetricsEnvironment`, but I think it may be 
better.




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

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


Reply via email to