Skip to content
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

Use atomic.Pointer instead of atomic.Value #3918

Closed
pellared opened this issue Mar 22, 2023 · 2 comments
Closed

Use atomic.Pointer instead of atomic.Value #3918

pellared opened this issue Mar 22, 2023 · 2 comments

Comments

@pellared
Copy link
Member

I'm looking at some code that uses atomic.Value+type casts. It could use atomic.Pointer (added in Go 1.19) instead to avoid type casts, be more readable and type safe. If not, would be good to at document the decision somewhere in contributor docs.

Originally posted by @ash2k in #3723 (comment)

@MrAlias
Copy link
Contributor

MrAlias commented Mar 27, 2023

What else needs to be done for this issue?

@dmathieu
Copy link
Member

Closing this, as per #3926, we won't be switching every other occurence of atomic.Value to atomic.Pointer, due to the low impact this has.

@dmathieu dmathieu closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants