mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-02 22:49:48 -06:00
WorkGate::acquire and acquire_urgent added `bytes` with plain `+`. Callers weigh work with saturating maths (export weights, raw denoise), so `bytes` can be usize::MAX: a debug build panicked with the gate's mutex held, and a release build wrapped the count, let the work in and left the accounting wrong until it ended. Both now use saturating_add (a Permit's drop already used saturating_sub), so a holder of usize::MAX makes later work wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>