import in threads: crashes & strange exceptions on dual core machines

Steve Holden steve at holdenweb.com
Tue Oct 31 20:11:59 EST 2006


Klaas wrote:
> robert wrote:
> 
>>Klaas wrote:
>>
>>>It seems clear that the import lock does not include fully-executing
>>>the module contents.  To fix this, just import cookielib before the
>>
>>What is the exact meaning of "not include fully-executing" - regarding the examples "import cookielib" ?
>>Do you really mean the import statement can return without having executed the cookielib module code fully?
>>(As said, a simple deadlock is not at all my problem)
> 
> 
> No, I mean that the import lock seems to not be held while the module
> contents are being executed (which would be why you are getting
> partially-initialized module in sys.modules).  Perhaps it _is_ held,
> but released at various points of the import process.  Someone more
> knowledgable of python internals will have to answer the question of
> what _should_ be occurring.
> 
... and who better than Tim Peters?

   http://mail.python.org/pipermail/python-list/2004-December/254497.html

HTH

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list