22 NOV 2026
compare and swap
Compare and swap is an atomic lock operation that releases the floor only when the requester presents the exact identifier of the current holder.
How it works in the room
Concurrency bugs appear differently in speech than in text: if two release timers or overlapping audio events fire at once, a naive release drops the guard held by the incoming speaker and allows two voices to collide. By requiring every release call to match the current holder identifier atomically, stale timers become harmless no-ops. Two personas cannot accidentally talk over each other during rapid handoffs, because only the caller holding the active generation can step aside or yield.
| Not this | Why the two are different |
|---|---|
| a blind release | A blind release clears the state regardless of who owns it, allowing a delayed timer from an earlier turn to silence a newly speaking persona. |
| a mutex lock | A mutex tracks ownership for memory writes without checking generation identity on release, whereas spoken handoffs require rejecting stale release signals from prior holders. |
Never called blind release, mutex lock
What this definition prevents
Prevents late release timers from clearing another persona's active lease and causing double speech.