Skip to content

use CompareAndSwap instead of the deprecated CAS shim internally#209

Open
c-tonneslan wants to merge 1 commit into
uber-go:masterfrom
c-tonneslan:cleanup/use-compareandswap
Open

use CompareAndSwap instead of the deprecated CAS shim internally#209
c-tonneslan wants to merge 1 commit into
uber-go:masterfrom
c-tonneslan:cleanup/use-compareandswap

Conversation

@c-tonneslan
Copy link
Copy Markdown

Closes #158.

`Bool.Toggle`, `Float32.Add`/`Sub` and `Float64.Add`/`Sub` were calling their own deprecated `CAS` wrappers, which just delegate to `CompareAndSwap` anyway. Hop straight to `CompareAndSwap` so the internal code isn't waving its own deprecation warning at the next user that runs gopls over the file.

Bool.Toggle and Float32/Float64.Add still called their own deprecated
CAS wrappers, which themselves just delegate to CompareAndSwap. Hop
straight to CompareAndSwap so the internal code isn't waving its own
deprecation warning at the user.

Closes uber-go#158

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
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

Successfully merging this pull request may close these issues.

Your generated code uses your own deprecated functions (very minor)

1 participant