-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
For background, see: #9259
Any case where we create a tokio::mpsc::channel of size 1, we are subsequently vulnerable to deadlock with the following code:
loop {
tokio::select! {
// Suppose this is queued first, but is only returning `Poll::pending`
_ = rx.send(...) => { return }
// Suppose instead, this select! branch triggers...
_ = yield_interval.tick() => {
// ... Then this call to `send` will be stuck forever, queued behind the first rx.send,
// which is no longer polled.
let result = rx.send(...).await;
if result = ... { return }
}
}
}This issue will document cases where we're using mpscs, and risking this behavior.
Metadata
Metadata
Assignees
Labels
No labels