mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
waiting_worker_can_cancel_before_initializer_returns gave its threads 2 s to start, and a busy FreeBSD VM in CI took longer. Its waits only guard against a hang: the initializer is held until the end of the test, so a waiter that can't cancel never returns, however long the guard is. They now allow 600 s, like the hang guard in page_contents_and_nested_forms_share_one_budget (#2812), which already covers the second test named in the issue. The test polls with a 1 ms sleep instead of yield_now, and the held initializer no longer panics a second time when the test fails. Checked by hand: with a 3 s delay at both threads' start the old test fails at its deadline and the new one passes; with the waiter's condvar wait made untimed (a real stall) the new test fails at its guard. Fixes #1970 Co-authored-by: Claude <noreply@anthropic.com>