File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 11/// Vendored and simplified from crossbeam-utils
22use core:: cell:: Cell ;
3- use core:: sync:: atomic;
43
54const SPIN_LIMIT : u32 = 6 ;
65
@@ -31,9 +30,7 @@ impl Backoff {
3130 #[ inline]
3231 pub fn spin ( & self ) {
3332 for _ in 0 ..1 << self . step . get ( ) . min ( SPIN_LIMIT ) {
34- // `hint::spin_loop` requires Rust 1.49.
35- #[ allow( deprecated) ]
36- atomic:: spin_loop_hint ( ) ;
33+ core:: hint:: spin_loop ( ) ;
3734 }
3835
3936 if self . step . get ( ) <= SPIN_LIMIT {
Original file line number Diff line number Diff line change @@ -64,9 +64,7 @@ impl ConcurrencyControl {
6464 if self . active . fetch_or ( RW_REQUIRED_BIT , SeqCst ) < RW_REQUIRED_BIT {
6565 // we are the first to set this bit
6666 while self . active . load ( Acquire ) != RW_REQUIRED_BIT {
67- // `hint::spin_loop` requires Rust 1.49.
68- #[ allow( deprecated) ]
69- std:: sync:: atomic:: spin_loop_hint ( )
67+ std:: hint:: spin_loop ( )
7068 }
7169 self . upgrade_complete . store ( true , Release ) ;
7270 }
@@ -99,9 +97,7 @@ impl ConcurrencyControl {
9997 } ) ;
10098 self . enable ( ) ;
10199 while !self . upgrade_complete . load ( Acquire ) {
102- // `hint::spin_loop` requires Rust 1.49.
103- #[ allow( deprecated) ]
104- std:: sync:: atomic:: spin_loop_hint ( )
100+ std:: hint:: spin_loop ( )
105101 }
106102 Protector :: Write ( self . rw . write ( ) )
107103 }
You can’t perform that action at this time.
0 commit comments