sync/atomic: can Value still not be copied after the first use? #32318
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
According to the document of type sync/atomic.Value,
A Value must not be copied after first use
. But I see in the source code of this type that it is no longer contains thenoCopy
type andgo vet
also no longer checks for copy operations of such values.So, is the values of sync/atomic.Value still not allowed to be copied after the first use??
By the way, I've already looked at this issue: #21504 .
What did you expect to see?
I want consistency about how to type sync/atomic.Value is used.
What did you see instead?
The documentation and source code should be consistent, but they are not.
The text was updated successfully, but these errors were encountered: