Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGosync.Mutex and RWMutexSingle-choice MCQ

What happens when this code runs?

var mu sync.RWMutex var data = map[string]int{"x": 1} func read() int { mu.RLock() v := data["x"] mu.Unlock() return v }