Files
lightcraft/crates/engine
insideTheFluxandClaude Opus 5.5 f2d36c59e6 Never crash: the work gate's byte count saturates instead of overflowing (#2576)
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>
2026-10-22 18:50:35 -07:00
..
2026-10-15 03:40:15 -04:00
2026-10-14 23:23:18 -04:00