async fn forward_to_queue<I, O>(source: &Scheduler<I>, target_queue: EventQueueHandle<O>)
where
    O: From<I>,
{
    // Note: This will keep waiting forever if the sending end disappears, which is fine for tests.
    loop {
        let ((_ancestor, event), queue_kind) = source.pop().await;
        target_queue.schedule(event, queue_kind).await;
    }
}
/// Long-running task that forwards events arriving on one scheduler to another.
Long-running task that forwards events arriving on one scheduler to another.
Long - running task that forwards events arriving on one scheduler to another .
async fn forward_to_queue<I, O>(source: &Scheduler<I>, target_queue: EventQueueHandle<O>)
where
    O: From<I>,
{
    // Note: This will keep waiting forever if the sending end disappears, which is fine for tests.
    loop {
        let ((_ancestor, event), queue_kind) = source.pop().await;
        target_queue.schedule(event, queue_kind).await;
    }
}
async fn forward_to_queue < I , O > ( source : & Scheduler < I > , target_queue : EventQueueHandle < O > ) where O : From < I > , { // Note: This will keep waiting forever if the sending end disappears, which is fine for tests. loop { let ( ( _ancestor , event ) , queue_kind ) = source . pop ( ) . await ; target_queue . schedule ( event , queue_kind ) . await ; } }
Long-running task that forwards events arriving on one scheduler to another.
Long - running task that forwards events arriving on one scheduler to another .
source
&Scheduler<I>
target_queue
EventQueueHandle<O>
source
&Scheduler<I>
target_queue
EventQueueHandle<O>