-
Notifications
You must be signed in to change notification settings - Fork 105
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
Add CompareAndSwap and Swap for String and Error. Deperecate CAS to reflect stdlib Value. #108
Conversation
I updated the PR. I removed the atomic type for |
Thank you for the contribution, but could you explain why you're doing this? What is the ultimate goal? Go <1.17 is EOL, so it doesn't seem very useful to support that. It looks like Go 1.19 will bring it's own changes to the atomic as well. |
I was looking for the I will change the PR to remove the backport, since you are fine with old versions being unsupported, but I will keep the rest of the changes that add |
Hey, Generally, since the PR title is now "do X and do Y", and X is independent from Y, I would keep them as separate PRs. Regarding the change itself:
|
This is to align with stdlib https://pkg.go.dev/sync/atomic
There was the following comment in the source code:
Now the situation is different.
|
Could you put up all the 3 changes (names, swap, formatting) in separate PRs, please? We can discuss merits of each of them individually. |
You want like this?
|
This aligns with sync/atomic from go1.19
Now I have 4 commits in this branch. The deprecation change depends on the previous one, and so can't submit simultaneous PRs without the history looking weird. I will have to keeps those together. I will submit the other commits as separate PRs. |
Before opening your pull request, please make sure that you've:
make test
); and finally,make lint
).Thanks for your contribution!
Add CompareAndSwap and Swap for String and Error. Deperecate CAS to reflect stdlib Value.
This is not done for Time since it is not meant to be compared.