Ralith(given that when a condition arises all wakers are consumed in the process of waking)
Ralithbundle up a
Vec<Waker>with a generation counter, increment the generation every time you wake, and have tasks add their waker iff the current generation != the generation at which they last added a waker
Ralithno, I don't want to have a
Vec<Waker>that contains unboundedly large numbers of the same
Ralithwhich is what can happen if you add one every time you're woken and the condition you were waiting for isn't satisfied
devroom. The main users tokio room is still active.
xionboxAny idea why that would happen?
error[E0277]: the trait bound `std::result::Result<(), std::sync::mpsc::SendError<std::result::Result<xb::ephem_registry::State, _>>>: std::future::Future` is not satisfied --> src/traj_srv/srv.rs:470:37 | 470 | ... tx.send(Ok(xb_state.clone())).await.unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `std::result::Result<(), std::sync::mpsc::SendError<std::result::Result<xb::ephem_registry::State, _>>>`
xionboxThe exact line is
xb_stateis a struct also generated from prost
xionboxAny idea what the problem could be?
xionboxI created the channel with
let (mut tx, rx) = mpsc::channel();
XbStateis generated from prost