Because of multithreading semantics, this is not reliable.

Grant Edwards grante at
Thu May 4 15:38:55 CEST 2006

On 2006-05-04, Olaf Meding <OlafMeding at> wrote:

>> return result   before that line, some other thread added a value !
> Sure, but that is the nature of using threads and a mutex.


> I hope you are you not saying that every function that uses a
> mutex should have a comment saying this is not "reliable"?

My point exactly.

Grant Edwards                   grante             Yow!  My pants just went to
                                  at               high school in the Carlsbad

More information about the Python-list mailing list