New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideas wanted: Rely on language features to enforce locking correctness #1389
Comments
Is there something else that would work? Anything that would be worth doing? |
@vrothberg came up with type stateful struct {
lock sync.Mutex
requiresLock struct {
field …
}
} which is much better than nothing. A downside is that such a type can’t be created with a trivial struct initializer: either |
Looking at #1324, #1332, #1379 , it’s not absolutely required but boy it would be nice if we could have the programming language enforce locking invariants
At the thousands of lines of c/storage code, and about half a dozen locks involved, it’s only natural that some mistakes will happen and we could certainly use some help noticing them.
Sadly, Go is very weak for these purposes. So, this is an open-ended call for ideas.
The text was updated successfully, but these errors were encountered: