-
Notifications
You must be signed in to change notification settings - Fork 1.5k
refactor: Remove go.uber.org/atomic in favor of std sync/atomic #1303
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romshark Thanks for the cleanup! I'll merge once tests are passing (failure seemed transient).
@@ -64,7 +59,7 @@ type Spanner struct { | |||
|
|||
config *Config | |||
|
|||
lock *uatomic.Uint32 | |||
lock atomic.Bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this cleanup!
@@ -54,7 +54,7 @@ func TestCasRestoreOnErr(t *testing.T) { | |||
|
|||
testcases := []struct { | |||
name string | |||
lock *atomic.Bool | |||
lock bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change made because there's no way to initialize sync/atomic.Bool
to true in a single statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct.
A standard atomic.Bool is available since Go 1.19. The dependency on go.uber.org/atomic is obsolete.