Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
sync: detect copying of Mutex #6188
Discussion on golang-dev: https://groups.google.com/forum/#!searchin/golang-dev/copying$20sync.mutex/golang-dev/3jCp3vd4BQ8/dqjjePtV8iwJ sync.Mutex can use the same technique as sync.Cond to detect copying. Package docs says "Values containing the types defined in this package should not be copied". It will also help to simplify runtime code and make Mutexes faster. Brad raised the concern that it will increase size of Mutex.
Forgive me if I have misunderstood something. I was just following the original thread of discussion. Brad suggested that there is a vet check which detects copying of sync.Mutex which is run as part of tests. And then you mentioned that it would still help to resolve #17953. And now, #17953 is resolved using a different fix.
So, do we still need this now ?