Skip to content

Commit

Permalink
fix: prevent hangs in notification methods
Browse files Browse the repository at this point in the history
  • Loading branch information
x42005e1f committed Oct 20, 2024
1 parent 019881a commit 207ad17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aiologic/locks/condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def notify(self, /, count=1, *, deadline=None):
notified += 1

try:
waiters.remove(event)
waiters.remove(token)
except ValueError:
pass
else:
Expand Down Expand Up @@ -204,7 +204,7 @@ def notify_all(self, /, *, deadline=None):
notified += 1

try:
waiters.remove(event)
waiters.remove(token)
except ValueError:
pass
else:
Expand Down

0 comments on commit 207ad17

Please sign in to comment.