Stay up to date on releases
Create your free account today to subscribe to this repository for notifications about new releases, and build software alongside 40 million developers on GitHub.
Sign up for free See pricing for teams and enterprises
yoshuawuyts
released this
This patch adds Future::timeout, providing a method counterpart to the
future::timeout free function. And includes several bug fixes around missing
APIs. Notably we're not shipping our new executor yet, first announced on our
blog.
Examples
use async_std::prelude::*;
use async_std::future;
use std::time::Duration;
let fut = future::pending::<()>(); // This future will never resolve.
let res = fut.timeout(Duration::from_millis(100)).await;
assert!(res.is_err()); // The future timed out, returning an err.Added
- Added
Future::timeoutas "unstable" (#600)
Fixes
- Fixed a doc test and enabled it on CI (#597)
- Fixed a rendering issue with the
streamsubmodule documentation (#621) Write::write_fmt's future is now correctly marked as#[must_use](#628)- Fixed the missing
io::Bytesexport (#633) - Fixed the missing
io::Chainexport (#633) - Fixed the missing
io::Takeexport (#633)