Asynchronous Messaging

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Sep 28 01:09:58 EDT 2007


En Fri, 28 Sep 2007 00:52:57 -0300, wink <wink at saville.com> escribi�:

> Interesting, from the documentation for deque says;
> "Deques support thread-safe, ..." which would seem to
> imply a mutex of some sort would be used. But in
> looking at collectionsmodule.c for 2.5.1 I don't see
> any mutex which would seem to imply there is one
> place else, maybe the GIL, or the documentation is
> incorrect.

Uh, I had never noticed that append/pop claimed to be thread safe. Ok,  
they don't appear to call any Python code, neither Py_DECREF is used, so  
the GIL would make those methods thread safe, I think.
R. Hettinger, any comments?

-- 
Gabriel Genellina




More information about the Python-list mailing list