Richard Oudkerk added the comment:

> I see.  Then this is a documentation bug.  The examples in the 
> documentation use such non-thread-safe assignments (combined with the 
> statement "These shared objects will be process and thread safe.").

Are you talking about this documentation:

  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”.

It only says that accesses are synchronized.  The problem is that you were 
assuming that "+=" involves a single access -- but that is not how python works.

Where in the examples is there "non-process-safe" access?  (Note that waiting 
for the only process which modifies a value to terminate using join() will 
prevent races.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to