Go's sync.RWMutex
can deadlock when the same goroutine tries to acquire RLock()
multiple times while a writer is waiting. This is by design due to Go's writer-preferring behavior that prevents writer starvation.
Key insight: RWMutex has a dual personality - readers can delay writers indefinitely until a writer starts waiting, then no new readers are allowed.
From the official Go documentation: