Basic threading questions

John Lull lull at
Mon Dec 31 16:11:08 EST 2001

"Jason Orendorff" <jason at> wrote (with possible deletions):

> No.  Most block nicely.  If you find one that doesn't,
> it's (almost certainly) a bug.

So the note in the thread module documentation is pretty much obsolete?

> This page starts with a very technical discussion:

This was pretty clear.  For my needs, then, it appears that the thread safety of
various operations boils down to whether they are effectively atomic (i.e.
atomic so far as other threads running under the same copy of the Python
interpreter are concerned).

I would assume that all built-in functions, and all methods of all built-in
types, are implemented as C functions rather than compiling to sequences of
interpreter byte-codes.  They should therefore be effectively atomic if they
don't use blocking system services. Is that a good assumption?

Which built-in operations are blocking should be pretty obvious from either the
documentation or the basic nature of the operation. Are there any non-obvious
blocking built-in operations?

Thanks *very* much for your swift response to my earlier query.


More information about the Python-list mailing list