Unusual minidom behaviour: Part Deux

Victor Bazarov vAbazarov at dAnai.com
Wed Jul 25 20:45:15 EDT 2001

Hi again, folks,

So, I dug deeper and found out that two threads were apparently
struggling to get xml.sax.__init__ module to execute a very
suspect __import__("xml.sax.expatreader").  Further digging led
me to the C source module that contained some comment "this is
to prevent two threads from importing the same module at the same
time returning incomplete module" (or something like that).  I
didn't try to comprehend the C source, sorry.  Although it may
not be so difficult, I prefer to leave fixing to those for whom
the system is an open book.

Understanding that Python thread mechanism does not use the OS
thread mechanism, and with all due respect to the creators and
contributors, I would like to ask, "Has anybody experienced
similar situation with more than one thread competing for the
same module?"

I searched in Google's Usenet archive and found that in 1998 it
used to be a problem (I think the message thread was called
"import not thread safe?").  I gather, later there was an attempt
made to resolve the issue.  [trying not to sound skeptical] Has
it been actually resolved?

Thank you in advance.

Please remove capital A's from my address when replying by mail

More information about the Python-list mailing list