mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-29 17:55:45 +01:00
Cancel gets wait() and wait_timeout(timeout). cancel() now wakes every thread blocked in either, through a Condvar beside the flag; is_cancelled() and cancel() keep their signatures. The never-finishing preview jobs in the Filter Gallery, Select and Mask and Content-Aware Fill stories, and the Filter Gallery trial's render, looped on is_cancelled() with 10 ms to 1 s sleeps. They now block in wait(), or in wait_timeout() for the fill story's one-hour job. Tests in queue_tests.rs: wait_timeout reads the flag, a thread blocked in wait returns once another thread cancels, and a running job blocked in wait ends when the queue drops its key.