This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients davin, grzgrzgrz3, pitrou, tomMoral, xiang.zhang
Date 2017-06-02.16:52:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thomas, thanks for the heads up.  I would suggest something like the following patch to multiprocessing.Pool:

$ git diff
diff --git a/Lib/multiprocessing/ b/Lib/multiprocessing/
index 7f77837..ebbb360 100644
--- a/Lib/multiprocessing/
+++ b/Lib/multiprocessing/
@@ -260,8 +260,16 @@ class Queue(object):
                     info('error in queue thread: %s', e)
-                    import traceback
-                    traceback.print_exc()
+                    self._on_queue_thread_error(e)
+    def _on_queue_thread_error(self, e):
+        """
+        Private API called when feeding data in the background thread
+        raises an exception.  For overriding by concurrent.futures.
+        """
+        import traceback
+        traceback.print_exc()
 _sentinel = object()

Then you can write your own Queue subclass in concurrent.futures to handle that error and clean up/restart whatever needs to be cleaned up or restarted.  What do you think?
Date User Action Args
2017-06-02 16:52:01pitrousetrecipients: + pitrou, davin, xiang.zhang, tomMoral, grzgrzgrz3
2017-06-02 16:52:01pitrousetmessageid: <>
2017-06-02 16:52:01pitroulinkissue30414 messages
2017-06-02 16:52:00pitroucreate