Author eric.snow
Recipients brett.cannon, eric.snow, gvanrossum, ncoghlan
Date 2014-12-17.05:59:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Keep in mind that the global import lock is only held long enough to create a module-level lock.  The cache of module locks is found at line 166 of Lib/importlib/ and the code related to module-level locking follows.  So unfortunately it won't be as simple as just getting the thread info from the global import lock.

Regardless, would it be useful to expose a function in importlib.util that indicates whether or not the current thread is importing a module (actually the names of the modules it is importing)?  Something like that would probably check both the global import lock and the module level locks, but make it unnecessary to expose the locks directly.  Given the situation with module-level locks I image such a helper is going to be desirable.
Date User Action Args
2014-12-17 05:59:41eric.snowsetrecipients: + eric.snow, gvanrossum, brett.cannon, ncoghlan
2014-12-17 05:59:41eric.snowsetmessageid: <>
2014-12-17 05:59:40eric.snowlinkissue23068 messages
2014-12-17 05:59:40eric.snowcreate