diff options
Diffstat (limited to 'Lib/multiprocessing/queues.py')
-rw-r--r-- | Lib/multiprocessing/queues.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py index c91535d..293ad76 100644 --- a/Lib/multiprocessing/queues.py +++ b/Lib/multiprocessing/queues.py @@ -133,9 +133,13 @@ class Queue(object): def close(self): self._closed = True - self._reader.close() - if self._close: - self._close() + try: + self._reader.close() + finally: + close = self._close + if close: + self._close = None + close() def join_thread(self): debug('Queue.join_thread()') |