File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change 116
116
#![ feature( raw_ref_op) ]
117
117
#![ feature( rustc_attrs) ]
118
118
#![ feature( receiver_trait) ]
119
+ #![ feature( renamed_spin_loop) ]
119
120
#![ feature( min_specialization) ]
120
121
#![ feature( slice_ptr_get) ]
121
122
#![ feature( slice_ptr_len) ]
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use core::convert::{From, TryFrom};
11
11
use core:: fmt;
12
12
use core:: hash:: { Hash , Hasher } ;
13
13
use core:: intrinsics:: abort;
14
+ use core:: hint;
14
15
use core:: iter;
15
16
use core:: marker:: { PhantomData , Unpin , Unsize } ;
16
17
use core:: mem:: { self , align_of_val, size_of_val} ;
@@ -764,6 +765,7 @@ impl<T: ?Sized> Arc<T> {
764
765
loop {
765
766
// check if the weak counter is currently "locked"; if so, spin.
766
767
if cur == usize:: MAX {
768
+ hint:: spin_loop ( ) ;
767
769
cur = this. inner ( ) . weak . load ( Relaxed ) ;
768
770
continue ;
769
771
}
You can’t perform that action at this time.
0 commit comments