async-std v1.4.0 Release Notes

Release Date: 2019-12-20 // over 4 years ago
  • 📚 API Documentation

    ⏱ 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::timeout as "unstable" (#600)

    🛠 Fixes

    • 🛠 Fixed a doc test and enabled it on CI (#597)
    • 🛠 Fixed a rendering issue with the stream submodule documentation (#621)
    • Write::write_fmt's future is now correctly marked as #[must_use] (#628)
    • 🛠 Fixed the missing io::Bytes export (#633)
    • 🛠 Fixed the missing io::Chain export (#633)
    • 🛠 Fixed the missing io::Take export (#633)