sync: merge defers in once.doSlow #38320
Labels
FrozenDueToAge
Performance
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?1.14.0
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?windows Amd64
In function doSlow as follow:
make better as follow:
because:
1, merge the two "defer"
2, do not need the atomic.StoreUint32, the "done = 1" is in the lock scope of mutex
make better performance
The text was updated successfully, but these errors were encountered: