Files
MichilisandClaude Fable 5.1 b27b0b7bcb Make the named mutex atomic
Lock did a get-then-set on the map without holding mutexMapSync, and
Unlock removed the entry before unlocking it. Two handlers that arrived
for a name not yet in the map each got their own mutex, and a waiter
could end up holding a mutex that later callers could not see. Both let
two button presses run the same faucet or inline object at once.

Entries are now created and looked up under one lock and reference
counted, so they are only removed when the last holder unlocks. Tests
run 200 goroutines through Lock and LockWithContext under -race.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-13 20:41:39 +00:00
..
2026-11-13 20:41:39 +00:00
2021-12-26 16:30:27 +01:00
2021-09-10 08:52:44 +02:00
2023-01-19 14:22:45 +01:00
2023-01-19 14:22:45 +01:00