This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +4
-5
lines changed
library/std/src/sync/mpmc Expand file tree Collapse file tree 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> {
169169 }
170170 Err ( _) => {
171171 backoff. spin ( ) ;
172- tail = self . load ( Ordering :: Relaxed ) ;
172+ tail = self . tail . load ( Ordering :: Relaxed ) ;
173173 }
174174 }
175175 } else if stamp. wrapping_add ( self . one_lap ) == tail + 1 {
@@ -250,7 +250,7 @@ impl<T> Channel<T> {
250250 token. array . stamp = head. wrapping_add ( self . one_lap ) ;
251251 return true ;
252252 }
253- Err ( h ) => {
253+ Err ( _ ) => {
254254 backoff. spin ( ) ;
255255 head = self . head . load ( Ordering :: Relaxed ) ;
256256 }
Original file line number Diff line number Diff line change 11//! Thread-local channel context.
22
33use super :: select:: Selected ;
4- use super :: utils:: Backoff ;
54
65use crate :: cell:: Cell ;
76use crate :: ptr;
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ impl<T> Channel<T> {
350350 token. list . offset = offset;
351351 return true ;
352352 } ,
353- Err ( h ) => {
353+ Err ( _ ) => {
354354 backoff. spin ( ) ;
355355 head = self . head . index . load ( Ordering :: Acquire ) ;
356356 block = self . head . block . load ( Ordering :: Acquire ) ;
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ impl Backoff {
111111 #[ inline]
112112 pub fn spin ( & self ) {
113113 let step = self . step . get ( ) . min ( SPIN_LIMIT ) ;
114- for _ in 0 ..step. pow ( 2 ) {
114+ for _ in 0 ..step. pow ( 2 ) {
115115 crate :: hint:: spin_loop ( ) ;
116116 }
117117
You can’t perform that action at this time.
0 commit comments