You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If multiple items are sent to the channel with the same priority, is there any promise about the order they will be received? In particular I want to know if sending order will be preserved.
So if I do the following:
channel.send(Item { priority: 1, val: X });
channel.send(Item { priority: 1, val: Y });
Is there any guarantee that X will be received before Y?
The text was updated successfully, but these errors were encountered:
The current impl definitely does not guarentee order:
use async_priority_channel::unbounded;#[tokio::main]asyncfnmain(){let(tx, rx) = unbounded();for i in0..10{
tx.send(i,0).await.unwrap();}loop{let i = rx.recv().await.unwrap();println!("Got: [{i:?}]");}}
If multiple items are sent to the channel with the same priority, is there any promise about the order they will be received? In particular I want to know if sending order will be preserved.
So if I do the following:
Is there any guarantee that X will be received before Y?
The text was updated successfully, but these errors were encountered: