Skip to content

Commit

Permalink
replace yield_now by sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Sep 18, 2023
1 parent b5bd7cb commit 54a33f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions yellowstone-grpc-geyser/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ use {
},
tokio::{
sync::{broadcast, mpsc, Mutex, Notify, RwLock, Semaphore},
task::yield_now,
time::{sleep, Duration, Instant},
},
tokio_stream::wrappers::ReceiverStream,
Expand Down Expand Up @@ -1070,7 +1069,7 @@ impl GrpcService {
}
}
Err(crossbeam_channel::TryRecvError::Empty) => {
yield_now().await;
sleep(Duration::from_millis(1)).await;
continue;
}
Err(crossbeam_channel::TryRecvError::Disconnected) => {
Expand Down

0 comments on commit 54a33f2

Please sign in to comment.