This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sgala
Recipients georg.brandl, jnoller, mishok13, roudkerk, sgala
Date 2008-12-06.13:24:44
SpamBayes Score 0.00041882432
Marked as misclassified No
Message-id <1228569885.63.0.360831088761.issue3206@psf.upfronthosting.co.za>
In-reply-to
Content
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))
History
Date User Action Args
2008-12-06 13:24:45sgalasetrecipients: + sgala, georg.brandl, roudkerk, jnoller, mishok13
2008-12-06 13:24:45sgalasetmessageid: <1228569885.63.0.360831088761.issue3206@psf.upfronthosting.co.za>
2008-12-06 13:24:44sgalalinkissue3206 messages
2008-12-06 13:24:44sgalacreate