rewrite wasi-tokio as just an task::block_in_place wrapper on cap-std-sync

This commit is contained in:
Pat Hickey
2021-05-04 11:29:02 -07:00
parent 686d8c22f9
commit f76fe8b764
13 changed files with 319 additions and 870 deletions

View File

@@ -78,7 +78,10 @@ pub async fn poll_oneoff<'a>(poll: &mut Poll<'a>) -> Result<(), Error> {
}
}
if let Some(Some(remaining_duration)) = duration {
tokio::time::timeout(remaining_duration, futures).await??;
match tokio::time::timeout(remaining_duration, futures).await {
Ok(r) => r?,
Err(_deadline_elapsed) => {}
}
} else {
futures.await?;
}