Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
291d7b02
Commit
291d7b02
authored
Apr 08, 2015
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
parents
b8e973f9
7ecfc82e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
Doc/library/multiprocessing.rst
Doc/library/multiprocessing.rst
+16
-8
Lib/multiprocessing/queues.py
Lib/multiprocessing/queues.py
+2
-1
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/multiprocessing.rst
View file @
291d7b02
...
...
@@ -262,14 +262,6 @@ that only one process prints to standard output at a time::
Without
using
the
lock
output
from
the
different
processes
is
liable
to
get
all
mixed
up
.
..
note
::
Some
of
this
package
's functionality requires a functioning shared semaphore
implementation on the host operating system. Without one, the
:mod:`multiprocessing.synchronize` module will be disabled, and attempts to
import it will result in an :exc:`ImportError`. See
:issue:`3770` for additional information.
Sharing
state
between
processes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
@@ -808,6 +800,14 @@ For an example of the usage of queues for interprocess communication see
immediately
without
waiting
to
flush
enqueued
data
to
the
underlying
pipe
,
and
you
don
't care about lost data.
.. note::
This class'
s
functionality
requires
a
functioning
shared
semaphore
implementation
on
the
host
operating
system
.
Without
one
,
the
functionality
in
this
class
will
be
disabled
,
and
attempts
to
instantiate
a
:
class
:`
Queue
`
will
result
in
an
:
exc
:`
ImportError
`.
See
:
issue
:`
3770
`
for
additional
information
.
The
same
holds
true
for
any
of
the
specialized
queue
types
listed
below
.
..
class
::
SimpleQueue
()
...
...
@@ -1183,6 +1183,14 @@ object -- see :ref:`multiprocessing-managers`.
This differs from the behaviour of :mod:`threading` where SIGINT will be
ignored while the equivalent blocking calls are in progress.
.. note::
Some of this package'
s
functionality
requires
a
functioning
shared
semaphore
implementation
on
the
host
operating
system
.
Without
one
,
the
:
mod
:`
multiprocessing
.
synchronize
`
module
will
be
disabled
,
and
attempts
to
import
it
will
result
in
an
:
exc
:`
ImportError
`.
See
:
issue
:`
3770
`
for
additional
information
.
Shared
:
mod
:`
ctypes
`
Objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
Lib/multiprocessing/queues.py
View file @
291d7b02
...
...
@@ -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
()
...
...
Misc/NEWS
View file @
291d7b02
...
...
@@ -19,6 +19,9 @@ Core and Builtins
Library
-------
- Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not
available. Patch by Davin Potts.
- Issue #10838: The subprocess now module includes SubprocessError and
TimeoutError in its list of exported names for the users wild enough
to use "from subprocess import *".
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment