We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3dd8cc commit 5328e32Copy full SHA for 5328e32
Lib/importlib/_bootstrap.py
@@ -85,6 +85,8 @@ def __enter__(self):
85
def __exit__(self, *args, **kwargs):
86
"""Remove self.lock from this thread's _blocking_on list."""
87
self.blocked_on.remove(self.lock)
88
+ if not self.blocked_on:
89
+ del _blocking_on[self.thread_id]
90
91
92
class _DeadlockError(RuntimeError):
0 commit comments