We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f63613 commit 70bac27Copy full SHA for 70bac27
packages/service-library/src/servicelib/redis/_semaphore.py
@@ -476,6 +476,8 @@ async def _periodic_reacquisition(
476
)
477
await auto_reacquisition_started.wait()
478
try:
479
+ # NOTE: this try/finally ensures that cancellation_event is set when we exit the context
480
+ # even in case of exceptions
481
yield semaphore
482
finally:
483
cancellation_event.set() # NOTE: this ensure cancellation is effective
0 commit comments