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 bd8e191 commit c4d46a3Copy full SHA for c4d46a3
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