File tree 4 files changed +4
-5
lines changed
library/std/src/sync/mpmc
4 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ impl<T> Channel<T> {
169
169
}
170
170
Err ( _) => {
171
171
backoff. spin ( ) ;
172
- tail = self . load ( Ordering :: Relaxed ) ;
172
+ tail = self . tail . load ( Ordering :: Relaxed ) ;
173
173
}
174
174
}
175
175
} else if stamp. wrapping_add ( self . one_lap ) == tail + 1 {
@@ -250,7 +250,7 @@ impl<T> Channel<T> {
250
250
token. array . stamp = head. wrapping_add ( self . one_lap ) ;
251
251
return true ;
252
252
}
253
- Err ( h ) => {
253
+ Err ( _ ) => {
254
254
backoff. spin ( ) ;
255
255
head = self . head . load ( Ordering :: Relaxed ) ;
256
256
}
Original file line number Diff line number Diff line change 1
1
//! Thread-local channel context.
2
2
3
3
use super :: select:: Selected ;
4
- use super :: utils:: Backoff ;
5
4
6
5
use crate :: cell:: Cell ;
7
6
use crate :: ptr;
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ impl<T> Channel<T> {
350
350
token. list . offset = offset;
351
351
return true ;
352
352
} ,
353
- Err ( h ) => {
353
+ Err ( _ ) => {
354
354
backoff. spin ( ) ;
355
355
head = self . head . index . load ( Ordering :: Acquire ) ;
356
356
block = self . head . block . load ( Ordering :: Acquire ) ;
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ impl Backoff {
111
111
#[ inline]
112
112
pub fn spin ( & self ) {
113
113
let step = self . step . get ( ) . min ( SPIN_LIMIT ) ;
114
- for _ in 0 ..step. pow ( 2 ) {
114
+ for _ in 0 ..step. pow ( 2 ) {
115
115
crate :: hint:: spin_loop ( ) ;
116
116
}
117
117
You can’t perform that action at this time.
0 commit comments