mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
Seen on the Mac mini while checking the release tip: 1 failure in 21 runs of cargo test, at the line that takes the claim file right after its first holder dropped it (Busy instead of Yes). The lock is a flock, which lives as long as the last copy of the open file. The test binary runs its tests on threads, and a test that starts a process at that moment hands the new process a copy of every open file until its exec. Measured there with a throwaway stress test: with a second thread starting /usr/bin/true in a loop the lock was still held right after the drop in 12 of 28,000 rounds and free within 2 ms every time; with no process starts, 0 of 28,000. Test only. The app does not depend on the lock being free at once: the child asks for the file again every second, and nothing it holds is copied into another process, since it starts none. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>