diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-06-08 15:21:55 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-06-08 15:21:55 (GMT) |
commit | dd696496605883a44da983ad81e55a01e996a004 (patch) | |
tree | 505cc588dc520311ff2935b8804c04663b26c054 /Lib/multiprocessing/queues.py | |
parent | 4a5e5de03f47b7076fc0eabc9817a59efd20049d (diff) | |
download | cpython-dd696496605883a44da983ad81e55a01e996a004.zip cpython-dd696496605883a44da983ad81e55a01e996a004.tar.gz cpython-dd696496605883a44da983ad81e55a01e996a004.tar.bz2 |
Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
children and raises BrokenProcessPool in such a situation. Previously it
would reliably freeze/deadlock.
Diffstat (limited to 'Lib/multiprocessing/queues.py')
-rw-r--r-- | Lib/multiprocessing/queues.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py index 3280a25..3324363 100644 --- a/Lib/multiprocessing/queues.py +++ b/Lib/multiprocessing/queues.py @@ -44,7 +44,7 @@ import weakref from queue import Empty, Full import _multiprocessing -from multiprocessing import Pipe +from multiprocessing.connection import Pipe, SentinelReady from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition from multiprocessing.util import debug, info, Finalize, register_after_fork from multiprocessing.forking import assert_spawning @@ -372,10 +372,10 @@ class SimpleQueue(object): def _make_methods(self): recv = self._reader.recv racquire, rrelease = self._rlock.acquire, self._rlock.release - def get(): + def get(*, sentinels=None): racquire() try: - return recv() + return recv(sentinels) finally: rrelease() self.get = get |