File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
library/std/src/sys/pal/windows Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ use crate::path::Path;
7
7
use crate :: ptr;
8
8
use crate :: slice;
9
9
use crate :: sync:: atomic:: AtomicUsize ;
10
- use crate :: sync:: atomic:: Ordering :: SeqCst ;
10
+ use crate :: sync:: atomic:: Ordering :: Relaxed ;
11
11
use crate :: sys:: c;
12
12
use crate :: sys:: fs:: { File , OpenOptions } ;
13
13
use crate :: sys:: handle:: Handle ;
@@ -214,11 +214,11 @@ pub fn spawn_pipe_relay(
214
214
fn random_number ( ) -> usize {
215
215
static N : AtomicUsize = AtomicUsize :: new ( 0 ) ;
216
216
loop {
217
- if N . load ( SeqCst ) != 0 {
218
- return N . fetch_add ( 1 , SeqCst ) ;
217
+ if N . load ( Relaxed ) != 0 {
218
+ return N . fetch_add ( 1 , Relaxed ) ;
219
219
}
220
220
221
- N . store ( hashmap_random_keys ( ) . 0 as usize , SeqCst ) ;
221
+ N . store ( hashmap_random_keys ( ) . 0 as usize , Relaxed ) ;
222
222
}
223
223
}
224
224
You can’t perform that action at this time.
0 commit comments