Which python libraries are thread-safe?

Stuart D. Gathman stuart at bmsi.com
Fri Oct 19 21:49:51 CEST 2001

While python threads are simple and effective, how am I to know which
library functions are thread safe and/or reentrant?  Do I have to
carefully examine the source for each one, and wrap it in a lock if I am
not convinced it is safe?  Shouldn't this be a required part of the docs
for any library module?  A lot of modules have global state which is
obviously a problem, but sometimes it is not clear.  Does tempfile work
reliably with threads?

Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - Mozart background
song for the Microsoft "Where do you want to go from here?" commercial.

More information about the Python-list mailing list