Santiago Gala <[EMAIL PROTECTED]> added the comment: Note that if the error is in the documentation semantics, and not in the implementation, then the benchmark code in the documentation is also broken, and should be change to not use lock=True/False respectively...
I'm not sure if the patch here is good or rather lock=True/False should be the right API and the implementation should be changed along this lines: diff --git a/Lib/multiprocessing/sharedctypes.py b/Lib/multiprocessing/sharedctypes.py index b94cd52..2f68e74 100644 --- a/Lib/multiprocessing/sharedctypes.py +++ b/Lib/multiprocessing/sharedctypes.py @@ -79,10 +79,11 @@ def Array(typecode_or_type, size_or_initializer, **kwds): if kwds: raise ValueError('unrecognized keyword argument(s): %s' % list(kwds.keys())) obj = RawArray(typecode_or_type, size_or_initializer) - if lock is None: + if lock is True: lock = RLock() - assert hasattr(lock, 'acquire') - return synchronized(obj, lock) + return synchronized(obj, lock) + return obj + def copy(obj): new_obj = _new_value(type(obj)) ---------- nosy: +sgala _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3206> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com