File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,6 @@ def __enter__(self):
85
85
def __exit__ (self , * args , ** kwargs ):
86
86
"""Remove self.lock from this thread's _blocking_on list."""
87
87
self .blocked_on .remove (self .lock )
88
- if len (self .blocked_on ) == 0 :
89
- # gh-101766: glboal cache should be cleaned-up
90
- # if there is no more _blocking_on for this thread.
91
- del _blocking_on [self .thread_id ]
92
- del self .blocked_on
93
88
94
89
95
90
class _DeadlockError (RuntimeError ):
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ class ModuleLockAsRLockTests:
33
33
test_repr = None
34
34
test_locked_repr = None
35
35
36
+ def tearDown (self ):
37
+ for splitinit in init .values ():
38
+ splitinit ._bootstrap ._blocking_on .clear ()
39
+
40
+
36
41
LOCK_TYPES = {kind : splitinit ._bootstrap ._ModuleLock
37
42
for kind , splitinit in init .items ()}
38
43
You can’t perform that action at this time.
0 commit comments