We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It appears to be testing copying a lock, which people shouldn't do.
func TestCondCopy(t *testing.T) { defer func() { err := recover() if err == nil || err.(string) != "sync.Cond is copied" { t.Fatalf("got %v, expect sync.Cond is copied", err) } }() c := Cond{L: &Mutex{}} c.Signal() c2 := c c2.Signal() }
Vet doesn't like it:
sync/cond_test.go:254: assignment copies lock value to c2: sync.Cond contains sync.noCopy
Objections to it being deleted for 1.8?
cc @dvyukov
Part of dealing with #11041.
The text was updated successfully, but these errors were encountered:
The mutex is not copied here. Cond contains a pointer to the mutex. But Cond itself should not be copied.
The test tests a useful property. Not all use vet. Cond detects the misuse reliably at runtime. Can we move it to _novet.go or something?
Sorry, something went wrong.
Ok, thanks. I'll figure out a way to add an exception for it as part of #11041 -- it's not going to be the only exception.
No branches or pull requests
It appears to be testing copying a lock, which people shouldn't do.
Vet doesn't like it:
Objections to it being deleted for 1.8?
cc @dvyukov
Part of dealing with #11041.
The text was updated successfully, but these errors were encountered: