Per the tokio docs:
Notifies the first waiting task.
If a task is currently waiting, that task is notified. Otherwise, a permit is stored in this Notify value and the next call to [notified().await](https://docs.rs/tokio/latest/tokio/sync/struct.Notify.html#method.notified) will complete immediately consuming the permit made available by this call to notify_one().
At most one permit may be stored by Notify. Many sequential calls to notify_one will result in a single permit being stored. The next call to notified().await will complete immediately, but the one after that will wait.
We do the following currently:
// Choose a pending waiter at random
let index = state.rng.gen_range(0..pending.len());
Which is not the first waiting task.
Looking at Notify it seems like the whole module is due for a revisit
Per the tokio docs:
We do the following currently:
Which is not the first waiting task.
Looking at
Notifyit seems like the whole module is due for a revisit