Skip to content

The agent that grows with you

fix: notify_all on lock timeout to wake blocked readers

kshitij65de109ef379
diff --git a/cron/scheduler.py b/cron/scheduler.py
index 2a5a543216d..0b3bf7465ac 100644
--- a/cron/scheduler.py
+++ b/cron/scheduler.py
@@ -504,6 +504,7 @@ class _ReadWriteLock:
if deadline is not None:
remaining = deadline - time.monotonic()
if remaining <= 0:
+ self._cond.notify_all()
return False
self._cond.wait(timeout=remaining)
else:
@@ -533,6 +534,7 @@ class _ReadWriteLock:
if deadline is not None:
remaining = deadline - time.monotonic()
if remaining <= 0:
+ self._cond.notify_all()
return False
self._cond.wait(timeout=remaining)
else: