mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
## Why Contention on the writer coordination lock can block writer cleanup indefinitely, preventing idle threads from unloading. ## What changed Retry coordination lock acquisition every 50 ms and return `io::ErrorKind::TimedOut` after 30 seconds of contention. This lets cleanup release writer ownership and idle unloading finish even while another process holds coordination. ## Testing Extend writer lock coverage to check the timeout error. Update the idle unload regression test to verify that the thread closes while coordination remains locked and can resume with its persisted turn after the lock is released. GitOrigin-RevId: 513117fdaf3890283e7acdd149ce9abb66075b63