Commit Graph
2 Commits
Author SHA1 Message Date
kacerrandClaude Fable 5 b290957fc9 05-lru-cache: implement mutex-guarded LRU over container/list
map[string]*list.Element + doubly linked list; Get/Put move hits to the
front, Put evicts from the back when at capacity, and every method
(including Len) takes the mutex.

Add TestLenRacesWithPut, which calls Len concurrently with a writer —
the existing test only read Len after wg.Wait(), so an unsynchronized
Len would never trip the race detector there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012MpK9niZm4jcs3mAJbxMfi
2026-09-02 09:34:08 +02:00
kacerrandClaude Fable 5 7219eb5a23 Initial commit: Go SRE interview exercises
Includes solved 02-worker-pool and 09-safe-counter (mutex, atomic, sharded).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GbnJj9ZqEx9nUvzkjdwfMq
2026-08-28 22:18:09 +02:00