threads blocked during import?

Aahz Maruch aahz at panix.com
Tue Apr 10 21:18:38 EDT 2001


In article <mailman.986930653.2113.python-list at python.org>,
Geoff Talvola  <gtalvola at nameconnector.com> wrote:
>
>I was wondering the other day: if two threads try to import the same module 
>at the same time, what happens?  I wrote a test program, and it looks like 
>an import blocks all other threads from importing.  This is probably a good 
>thing, since you only want the module to be imported once.

Yup.  See Python/import.c
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list