Skip to content

Clarify Once::call_once memory ordering guarantees in docs #24908

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

Merged
merged 1 commit into from
Apr 30, 2015

Conversation

inrustwetrust
Copy link
Contributor

call_once guarantees that there is a happens-before relationship between its closure and code following it via the sequentially consistent atomic store/loads of self.cnt.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+ ed4c05e

Thanks!

cc @aturon, I remember us talking about the API commitment of orderings like this in the past, I just find this interesting!

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

⌛ Testing commit ed4c05e with merge ab83ae5...

@bors
Copy link
Collaborator

bors commented Apr 29, 2015

💔 Test failed - auto-linux-32-opt

@alexcrichton
Copy link
Member

@bors: retry

On Wed, Apr 29, 2015 at 9:31 AM, bors [email protected] wrote:

[image: 💔] Test failed - auto-linux-32-opt
http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4741


Reply to this email directly or view it on GitHub
#24908 (comment).

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 29, 2015
`call_once` guarantees that there is a happens-before relationship between its closure and code following it via the sequentially consistent atomic store/loads of `self.cnt`.
@bors bors merged commit ed4c05e into rust-lang:master Apr 30, 2015
@inrustwetrust inrustwetrust deleted the once_memory_ordering branch May 1, 2015 09:11
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.

5 participants