[New-bugs-announce] [issue23068] Add a way to determine if the current thread has the import lock
Guido van Rossum
report at bugs.python.org
Wed Dec 17 03:14:37 CET 2014
New submission from Guido van Rossum:
imp.lock_held() returns True if *any* thread is currently importing something. I'd like to have an API that can tell whether the *current* thread has the import lock. The implementation keeps track of this, but doesn't make the info available.
Use case: print a warning/error if a network call is made during import.
----------
components: Library (Lib)
messages: 232792
nosy: gvanrossum
priority: normal
severity: normal
stage: needs patch
status: open
title: Add a way to determine if the current thread has the import lock
type: enhancement
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23068>
_______________________________________
More information about the New-bugs-announce
mailing list