[Python-checkins] r61029 - python/trunk/Doc/library/thread.rst python/trunk/Doc/library/threading.rst
Georg Brandl
g.brandl at gmx.net
Mon Feb 25 21:24:29 CET 2008
Christian Heimes schrieb:
> Nick Coghlan wrote:
>> If we have C code doing unsafe imports we have to fix the C code, not
>> warn everybody off from doing imports outside the main thread. Similarly
>> if there are crashers at interpreter shutdown.
>
> I implemented PyImport_ImportModuleNoBlock() to have safe imports in C
> code. The function tries to grap the module from sys.modules first
> without grabbing the import lock. If the module wasn't loaded before it
> uses the standard import modules *unless* a different thread holds the
> import lock. In the latter case it raises an exception.
I've now reverted this; please find an agreement if a warning is necessary
and what it should contain :)
Georg
More information about the Python-checkins
mailing list