[2.7] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc (GH-1683) by pitrou · Pull Request #1817 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions Lib/multiprocessing/queues.py
15 changes: 15 additions & 0 deletions Lib/test/test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,21 @@ def test_no_import_lock_contention(self):
self.fail("Probable regression on import lock contention;"
" see Issue #22853")

def test_queue_feeder_donot_stop_onexc(self):
# bpo-30414: verify feeder handles exceptions correctly
if self.TYPE != 'processes':
self.skipTest('test not appropriate for {}'.format(self.TYPE))

class NotSerializable(object):
def __reduce__(self):
raise AttributeError
with test.support.captured_stderr():
q = self.Queue()
q.put(NotSerializable())
q.put(True)
self.assertTrue(q.get(timeout=0.1))


#
#
#
Expand Down
3 changes: 3 additions & 0 deletions Misc/NEWS