static REGISTRY_OP_LOCK: Mutex<()>Expand description
Serializes this process’s own read-compare-remove sequences
(remove_if_nonce / remove_shared_if_nonce) against
its own writes. Both the racing writer (a fallback respawn’s
re-registration) and the racing remover (the dying spawn’s
exit-handler) live in this same agentmux-srv process — each per-agent
registry file has exactly one writing instance — so a process-local
mutex is sufficient to make the compare-and-remove atomic; no file
locking needed. Plain removes/writes for other controller types don’t
need the guard but take it anyway for uniformity (it’s uncontended).