Comment on Go’s race detector has a mutex blind spotparentComments−prerok1yIt's tedious, I agree, but I found it easiest to just wrap it in an inline function defined and called there and then.This alleviates all these problems of unlocks within if bodies at the cost of an indent (and maybe slight performance penalty).
Comments
It's tedious, I agree, but I found it easiest to just wrap it in an inline function defined and called there and then.
This alleviates all these problems of unlocks within if bodies at the cost of an indent (and maybe slight performance penalty).