File tree 2 files changed +2
-7
lines changed
2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 1
1
/// Vendored and simplified from crossbeam-utils
2
2
use core:: cell:: Cell ;
3
- use core:: sync:: atomic;
4
3
5
4
const SPIN_LIMIT : u32 = 6 ;
6
5
@@ -31,9 +30,7 @@ impl Backoff {
31
30
#[ inline]
32
31
pub fn spin ( & self ) {
33
32
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 ( ) ;
37
34
}
38
35
39
36
if self . step . get ( ) <= SPIN_LIMIT {
Original file line number Diff line number Diff line change @@ -64,9 +64,7 @@ impl ConcurrencyControl {
64
64
if self . active . fetch_or ( RW_REQUIRED_BIT , SeqCst ) < RW_REQUIRED_BIT {
65
65
// we are the first to set this bit
66
66
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 ( )
70
68
}
71
69
self . upgrade_complete . store ( true , Release ) ;
72
70
}
You can’t perform that action at this time.
0 commit comments