File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ impl Once {
201
201
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
202
202
pub fn call_once < F > ( & ' static self , f : F ) where F : FnOnce ( ) {
203
203
// Fast path, just see if we've completed initialization.
204
- if self . state . load ( Ordering :: SeqCst ) == COMPLETE {
204
+ if self . state . load ( Ordering :: Acquire ) == COMPLETE {
205
205
return
206
206
}
207
207
@@ -222,7 +222,7 @@ impl Once {
222
222
#[ unstable( feature = "once_poison" , issue = "31688" ) ]
223
223
pub fn call_once_force < F > ( & ' static self , f : F ) where F : FnOnce ( & OnceState ) {
224
224
// same as above, just with a different parameter to `call_inner`.
225
- if self . state . load ( Ordering :: SeqCst ) == COMPLETE {
225
+ if self . state . load ( Ordering :: Acquire ) == COMPLETE {
226
226
return
227
227
}
228
228
You can’t perform that action at this time.
0 commit comments