Possible BUG in Python2.x sre and threaded import locking

Tim Peters tim at zope.com
Wed Aug 22 15:22:28 EDT 2001


[Joe Kelly]
> There appears to be a bug in the way Python2.x does import locking on
> sre.  This is illustrated by the following code fragments.
> ...

Never write a module M so that M spawns threads as a side-effect of merely
being imported.  Follow that advice and you'll be happy.  In current CVS you
can read the comments in Lib/test/test_threaded_import.py for clues as to
why, but much easier just to follow that rule.

anything-else-is-fighting-the-universe-and-the-universe-usually-
    wins-ly y'rs  - tim





More information about the Python-list mailing list