Files
picoclaw/pkg/evolution
程智超0668000959 bbdf746bcb fix(evolution): use CompareAndSwap for atomic lockStoreFile repair
Replace the Delete+LoadOrStore pattern with CompareAndSwap to
atomically swap in a fresh mutex when a corrupted entry is detected.

Changes:
- Use a retry loop with CAS instead of Delete+LoadOrStore, avoiding
  the race where two goroutines could create different mutexes
- Add nil check: a nil *sync.Mutex passes the type assertion but
  panics on Lock() — now handled by the CAS recovery path
- Use continue-loop retry instead of unchecked second assertion

CompareAndSwap guarantees that when multiple goroutines detect a
corrupted entry, they converge on the same replacement mutex.
2026-06-12 11:25:14 +08:00
..
2026-05-11 16:13:27 +08:00
2026-05-11 16:13:27 +08:00
2026-05-11 16:13:27 +08:00
2026-05-11 16:13:27 +08:00
2026-05-11 16:13:27 +08:00