File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -85,11 +85,6 @@ def __enter__(self):
8585 def __exit__ (self , * args , ** kwargs ):
8686 """Remove self.lock from this thread's _blocking_on list."""
8787 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
9388
9489
9590class _DeadlockError (RuntimeError ):
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ class ModuleLockAsRLockTests:
3333 test_repr = None
3434 test_locked_repr = None
3535
36+ def tearDown (self ):
37+ for splitinit in init .values ():
38+ splitinit ._bootstrap ._blocking_on .clear ()
39+
40+
3641LOCK_TYPES = {kind : splitinit ._bootstrap ._ModuleLock
3742 for kind , splitinit in init .items ()}
3843
You can’t perform that action at this time.
0 commit comments