Comment Comment by Xeoncross > and 'f' panics, the program's deadlocked foreverI don't see `mu.Lock(); f(); mu.Unlock()` anywhere really.`mu.Lock(); defer mu.Unlock(); f();` is how everyone does it to prevent that possibility. parent Xeoncross 1 year ago
I don't see `mu.Lock(); f(); mu.Unlock()` anywhere really.
`mu.Lock(); defer mu.Unlock(); f();` is how everyone does it to prevent that possibility.