Van Tran

20%
Flag icon
You’ll notice that we always call Unlock within a defer statement. This is a very common idiom when utilizing a Mutex to ensure the call always happens, even when panicing. Failing to do so will probably cause your program to deadlock.
Concurrency in Go: Tools and Techniques for Developers
Rate this book
Clear rating
Open Preview