summaryrefslogtreecommitdiff
path: root/Doc/library/multiprocessing.rst
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-09-21 06:51:45 +0300
committerBerker Peksag <berker.peksag@gmail.com>2015-09-21 06:51:45 +0300
commite0379e4f4c8defe4469e7352faf848c1df0332e2 (patch)
tree766519755cebb3b7f0deafa2cef3ad16f9cec93d /Doc/library/multiprocessing.rst
parent919e78715fa3b7f1e786325fbf99431651b4f5dd (diff)
parent635bed913a095082849981e9c9a142219c85ce00 (diff)
downloadcpython-e0379e4f4c8defe4469e7352faf848c1df0332e2.tar.gz
Issue #23484: Document differences between synchronization primitives of
threading and multiprocessing modules. In multiprocessing, the name of the first parameter of the acquire methods is "block", but "blocking" in threading. This commit also improves documentation of Lock and RLock. Patch by Davin Potts.
Diffstat (limited to 'Doc/library/multiprocessing.rst')
-rw-r--r--Doc/library/multiprocessing.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 82de19b5c8..a4d42abb34 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -1458,6 +1458,9 @@ processes.
Note that accessing the ctypes object through the wrapper can be a lot slower
than accessing the raw ctypes object.
+ .. versionchanged:: 3.5
+ Synchronized objects support the :term:`context manager` protocol.
+
The table below compares the syntax for creating shared ctypes objects from
shared memory with the normal ctypes syntax. (In the table ``MyStruct`` is some
@@ -1945,9 +1948,9 @@ itself. This means, for example, that one shared object can contain a second:
>>> l = manager.list(range(10))
>>> l._callmethod('__len__')
10
- >>> l._callmethod('__getitem__', (slice(2, 7),)) # equiv to `l[2:7]`
+ >>> l._callmethod('__getitem__', (slice(2, 7),)) # equivalent to l[2:7]
[2, 3, 4, 5, 6]
- >>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]`
+ >>> l._callmethod('__getitem__', (20,)) # equivalent to l[20]
Traceback (most recent call last):
...
IndexError: list index out of range