gh-101766: Fix refleak for _BlockingOnManager resources from test suite level (gh-101988)

This commit is contained in:
Dong-hee Na 2023-02-18 00:18:47 +09:00 committed by GitHub
parent 072011b3c3
commit f482ade4c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -85,11 +85,6 @@ class _BlockingOnManager:
def __exit__(self, *args, **kwargs):
"""Remove self.lock from this thread's _blocking_on list."""
self.blocked_on.remove(self.lock)
if len(self.blocked_on) == 0:
# gh-101766: glboal cache should be cleaned-up
# if there is no more _blocking_on for this thread.
del _blocking_on[self.thread_id]
del self.blocked_on
class _DeadlockError(RuntimeError):