mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 18:55:32 +00:00
aquatic_udp: glommio: add yield_if_needed(), add comment
This commit is contained in:
parent
93907822f8
commit
9dc615a8f9
2 changed files with 5 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
|
|||
use futures_lite::stream::empty;
|
||||
use futures_lite::StreamExt;
|
||||
use glommio::channels::channel_mesh::{MeshBuilder, Partial, Role};
|
||||
use glommio::prelude::*;
|
||||
use rand::prelude::SmallRng;
|
||||
use rand::SeedableRng;
|
||||
|
||||
|
|
@ -56,5 +57,7 @@ pub async fn run_request_worker(
|
|||
if let Err(err) = response_senders.try_send_to(producer_index, (response, addr)) {
|
||||
::log::warn!("response_sender.try_send: {:?}", err);
|
||||
}
|
||||
|
||||
yield_if_needed().await;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue