-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
Currently, it seems that there is this assertion within the runtime.
assertion `left != right` failed: Attempting to block on an empty list of pollables - without any pending work, no progress can be made and wasi::io::poll::poll will trap
I'm not sure of the reasoning behind this assertion, since we really aren't interested in any pollables yet, and simply just want the runtime to run the next poll loop. But it's causing the runtime to crash in some scenarios which would run totally fine in other single-threaded async runtimes.
pub fn main() {
wstd::runtime::block_on(async move {
let (tx, mut rx) = tokio::sync::mpsc::channel(1);
let fut_1 = async move {
rx.recv().await;
println!("received it");
};
let fut_2 = async move {
tx.send(()).await;
println!("sent it over");
};
futures::join!(fut_1, fut_2);
});
}Of course, this is a simple example, but in a more complex setup with tasks spawned through FuturesUnordered and channels communicating, it seems like scenarios where we aren't yet interested in waiting for a Pollable comes up quite often and will cause the runtime to crash
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels