mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
This commit is contained in:
parent
52c0c3382d
commit
7ecfc82edb
3 changed files with 21 additions and 9 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue