On Mar 15, 6:19 am, Aaron Brady <castiro...@gmail.com> wrote: > > Your code hung on my machine. The call to 'main()' should be in an > 'if __name__' block: > > if __name__== '__main__': > main() > > Is it possible you are just seeing the effects of the non-atomic > '__iadd__' operation? That is, the value is read, added, and written > at different times, between which other processes might have > intervened.
I've forgotten to remove ' gl.append(mp.Lock()) ' from the second code. Anyways if what you said is true, then why doesn't the documentation say so? I also realized that the created lock's release and acquire methods are also imbued to the created shared object, and this is also undocumented. -- http://mail.python.org/mailman/listinfo/python-list