[issue4449] AssertionError in Doc/includes/mp_benchmarks.py

Amaury Forgeot d'Arc report at bugs.python.org
Tue Dec 2 22:10:34 CET 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Here is a patch nonetheless. It makes the code match the the documentation:

http://docs.python.org/library/multiprocessing.html#multiprocessing.sharedctypes.Arra
y
"""
- If lock is True (the default) then a new lock object is created to synchronize 
access to the value.
- If lock is a Lock or RLock object then that will be used to synchronize access to 
the value.
- If lock is False then access to the returned object will not be automatically 
protected by a lock, so it will not necessarily be process-safe.
"""

I changed multiprocessing.sharedctypes.Array and multiprocessing. sharedctypes.Array
I had to change some tests: now "lock=None" is an error.
+ some markup fixes in the documentation.

----------
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file12204/mp_array.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4449>
_______________________________________


More information about the Python-bugs-list mailing list