summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-04-08 14:57:44 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-04-08 14:57:44 (GMT)
commit291d7b0284c879b727e6f1c0d0c35a062c316a3a (patch)
treeb49b18071e92fb43db662f52526646524ab860da /Lib/multiprocessing
parentb8e973f9374524b3065e70bd265da2a8901b4638 (diff)
parent7ecfc82edbe5ccb125f53b92447abd4bc155ba1c (diff)
downloadcpython-291d7b0284c879b727e6f1c0d0c35a062c316a3a.zip
cpython-291d7b0284c879b727e6f1c0d0c35a062c316a3a.tar.gz
cpython-291d7b0284c879b727e6f1c0d0c35a062c316a3a.tar.bz2
Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/queues.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index c07ad40..b004a6a 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -35,7 +35,8 @@ class Queue(object):
def __init__(self, maxsize=0, *, ctx):
if maxsize <= 0:
- maxsize = _multiprocessing.SemLock.SEM_VALUE_MAX
+ # Can raise ImportError (see issues #3770 and #23400)
+ from .synchronize import SEM_VALUE_MAX as maxsize
self._maxsize = maxsize
self._reader, self._writer = connection.Pipe(duplex=False)
self._rlock = ctx.Lock()