Files
codex/codex-rs/rollout
Dmitriy Kovalenko e428b9a16b Reduce contention in thread writer lock coordination (#59969)
## Why

Exclusive coordination serialized writer acquisition across unrelated threads and could delay releasing writer ownership while waiting to remove a lock file.

## What changed

Use shared coordination when opening thread writer locks. Attempt the initial stale-lock sweep only when exclusive coordination is immediately available, and keep rollout publication exclusively coordinated.

When dropping a writer guard, remove its lock file only if exclusive coordination can be acquired immediately. Otherwise, release ownership and leave the file available for reuse or later cleanup.

## Testing

Extend the writer-lock test to cover acquisition for different threads under shared coordination, rejection of competing owners for the same thread, and prompt ownership release and reacquisition when cleanup cannot acquire exclusive coordination.

GitOrigin-RevId: 3e187b32dbef3bcfdd8c62e91eca58b615f3879e
2026-11-06 20:16:15 +00:00
..