We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d80497e commit 15213acCopy full SHA for 15213ac
src/libstd/sync/once.rs
@@ -201,7 +201,7 @@ impl Once {
201
#[stable(feature = "rust1", since = "1.0.0")]
202
pub fn call_once<F>(&'static self, f: F) where F: FnOnce() {
203
// Fast path, just see if we've completed initialization.
204
- if self.state.load(Ordering::SeqCst) == COMPLETE {
+ if self.state.load(Ordering::Acquire) == COMPLETE {
205
return
206
}
207
@@ -222,7 +222,7 @@ impl Once {
222
#[unstable(feature = "once_poison", issue = "31688")]
223
pub fn call_once_force<F>(&'static self, f: F) where F: FnOnce(&OnceState) {
224
// same as above, just with a different parameter to `call_inner`.
225
226
227
228
0 commit comments