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 pitrou
Recipients amaury.forgeotdarc, chris.jerdonek, docs@python, pitrou, rhettinger
Date 2012-07-12.16:10:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Classes written in C are necessarily thread-safe (they rely on the GIL)

That's not really true. A single Py_DECREF() can release the GIL by way of executing a Python __del__ method (or a weakref callback, or even the tp_dealloc of a file object that happens to release the GIL when close()ing the underlying file descriptor) somewhere along the reference chain, as evidenced by Amaury in

I think that if the deque documentation makes the claim that some methods are thread-safe, they should be *really* thread-safe (which doesn't necessarily imply a lock, but implies being extra careful). Otherwise it's better to remove the claim from the docs.
Date User Action Args
2012-07-12 16:10:45pitrousetrecipients: + pitrou, rhettinger, amaury.forgeotdarc, chris.jerdonek, docs@python
2012-07-12 16:10:45pitrousetmessageid: <>
2012-07-12 16:10:45pitroulinkissue15329 messages
2012-07-12 16:10:44pitroucreate