1
0
Fork 0
forked from wry/wry
wry/src/tasks/slow_clients.rs
2024-07-25 19:40:29 +02:00

27 lines
587 B
Rust

use {crate::state::State, std::rc::Rc};
pub struct SlowClientHandler {
pub state: Rc<State>,
}
impl SlowClientHandler {
pub async fn handle_events(&mut self) {
loop {
let client = self.state.slow_clients.pop().await;
client.check_queue_size().await;
}
}
}
pub struct SlowEiClientHandler {
pub state: Rc<State>,
}
impl SlowEiClientHandler {
pub async fn handle_events(&mut self) {
loop {
let client = self.state.slow_ei_clients.pop().await;
client.check_queue_size().await;
}
}
}