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

What does Go's runtime detect in this code when run normally (no race detector)?

func main() { var mu sync.Mutex mu.Lock() mu.Lock() fmt.Println(1) mu.Unlock() }