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

sync/atomic: add Exchange operation #5722

Closed
dvyukov opened this issue Jun 17, 2013 · 3 comments
Closed

sync/atomic: add Exchange operation #5722

dvyukov opened this issue Jun 17, 2013 · 3 comments
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Jun 17, 2013

Add atomic Exchange operation to sync/atomic package.

Exchange is a part of gentleman's atomic set of operations. It's
provided by C/C++/Java/etc.
Exchange is useful for some stack/queue algorithms; stats counters
(load and reset to 0); runtime uses runtime·xchg in locks, scheduler
and GC.
@rsc
Copy link
Contributor

rsc commented Jun 17, 2013

Comment 1:

OK, but it should be called Swap, because that's the name already used in CompareAndSwap.

Labels changed: added go1.2, removed go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added feature.

@dvyukov
Copy link
Member Author

dvyukov commented Aug 13, 2013

Comment 3:

This issue was closed by revision 0e15b03.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants