x.RLock() if x.ReadStuff() == 123 { x.RUnlock() ... x.Lock() // write lock x.WriteStuff() x.Unlock() } else { x.RUnlock() }