Commits
Click on a commit to change the comparison rangeFix wait() timeout not being respected when using WatcherThreadCancelScope
The wait() function's timeout was not being properly enforced when
pytest-timeout or other code set a SIGALRM handler, causing
cancel_sync_after to fall back to WatcherThreadCancelScope. This scope
cannot interrupt blocking system calls like threading.Event.wait().
The fix calculates a deadline at the start and passes the remaining time
as a timeout to finished_event.wait(). This ensures the wait returns
when the deadline is reached, allowing proper timeout handling.
This reduces test runtime from ~120 seconds to ~12 seconds for
test_wait_monitors_all_futures_concurrently_with_timeout.
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>14 hours ago
by devin-ai-integration[bot] Restore timeout_context wrapper as requested by reviewer
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>13 hours ago
by devin-ai-integration[bot]