From 4911f4599b02dbc3e08c9cbf2b583f267752e6b1 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 15 Oct 2019 17:50:24 +0200 Subject: [PATCH 1/4] init changelog Signed-off-by: Yoshua Wuyts --- CHANGELOG.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77ab025a1..6979d5142 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,93 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview ## [Unreleased] +# [0.99.10] - 2019-10-16 + +This patch stabilizes several core concurrency macros, introduces async versions +of `Path` and `PathBuf`, and adds almost 100 other commits. + +## Examples + +__Asynchronously read directories from the filesystem__ +```rust +use async_std::fs; +use async_std::path::Path; +use async_std::prelude::*; + +let path = Path::new("/laputa"); +let mut dir = fs::read_dir(&path).await.unwrap(); +while let Some(entry) = dir.next().await { + if let Ok(entry) = entry { + println!("{:?}", entry.path()); + } +} +``` + +__Cooperatively reschedule the current task on the executor__ +```rust +use async_std::prelude::*; +use async_std::task; + +task::spawn(async { + let x = fibonnacci(1000); // Do expensive work + task::yield_now().await; // Allow other tasks to run + x + fibonnacci(100) // Do more work +}) +``` + +__Create an interval stream__ +```rust +use async_std::prelude::*; +use async_std::stream; +use std::time::Duration; + +let mut interval = stream::interval(Duration::from_secs(4)); +while let Some(_) = interval.next().await { + println!("prints every four seconds"); +} +``` + +## Added + +- Added `FutureExt` to the `prelude`, allowing us to extend `Future` +- Added `Stream::merge` as "unstable", replacing `stream::join!` +- Added `Stream::partial_cmp` +- Added `Stream::take_while` +- Added `future::IntoFuture` as "unstable" +- Added `io::BufRead::split` +- Added `io::Write::write_fmt` +- Added `stream::from_fn` +- Added `print!`, `println!`, `eprint!`, `eprintln!` macros as "unstable" +- Added `process` as "unstable", re-exporting std types only for now +- Added `std::path::PathBuf` with all associated methods +- Added `std::path::Path` with all associated methods +- Added `stream::ExactSizeStream` as "unstable" +- Added `stream::FusedStream` as "unstable" +- Added `stream::interval` as "unstable" +- Added `task::spawn_blocking` as "unstable", replacing `task::blocking` +- Added `task::yield_now` +- Added `write!` and `writeln!` macros as "unstable" +- Added `std::net` re-exports to the `net` submodule +- Stabilized `future::join!` and `future::try_join!` +- Stabilized `future::timeout` +- Stabilized `path` +- Stabilized `task::ready!` + +## Changed + +- Fixed `BufWriter::into_inner` so it calls `flush` before yielding +- Refactored `io::BufWriter` internals +- Refactored `net::ToSocketAddrs` internals +- Removed Travis CI entirely +- Rewrote the README.md +- Stabilized `io::Cursor` +- Switched bors over to use GitHub actions + +## Removed + +- Removed the "unstable" `stream::join!` in favor of `Stream::merge` +- Removed the "unstable" `task::blocking` in favor of `task::spawn_blocking` + # [0.99.9] - 2019-10-08 This patch upgrades our `futures-rs` version, allowing us to build on the 1.39 @@ -183,7 +270,8 @@ task::blocking(async { - Initial beta release -[Unreleased]: https://github.com/async-rs/async-std/compare/v0.99.9...HEAD +[Unreleased]: https://github.com/async-rs/async-std/compare/v0.99.10...HEAD +[0.99.10]: https://github.com/async-rs/async-std/compare/v0.99.9...v0.99.10 [0.99.9]: https://github.com/async-rs/async-std/compare/v0.99.8...v0.99.9 [0.99.8]: https://github.com/async-rs/async-std/compare/v0.99.7...v0.99.8 [0.99.7]: https://github.com/async-rs/async-std/compare/v0.99.6...v0.99.7 From 609a5780a22c4c7b8d8080c04ef76f93dff47b83 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Tue, 15 Oct 2019 17:51:32 +0200 Subject: [PATCH 2/4] 0.99.10 Signed-off-by: Yoshua Wuyts --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index dc319f71b..d1c10a62b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "async-std" -version = "0.99.9" +version = "0.99.10" authors = [ "Stjepan Glavina ", "Yoshua Wuyts ", From 2bd82ac2497ba5a710c28476c2797c4af82c3957 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Wed, 16 Oct 2019 01:48:40 +0200 Subject: [PATCH 3/4] updates Signed-off-by: Yoshua Wuyts --- CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6979d5142..f7e8731ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,24 +56,29 @@ while let Some(_) = interval.next().await { ## Added - Added `FutureExt` to the `prelude`, allowing us to extend `Future` +- Added `Stream::ge` +- Added `Stream::le` +- Added `Stream::lt` - Added `Stream::merge` as "unstable", replacing `stream::join!` - Added `Stream::partial_cmp` - Added `Stream::take_while` - Added `future::IntoFuture` as "unstable" - Added `io::BufRead::split` - Added `io::Write::write_fmt` -- Added `stream::from_fn` - Added `print!`, `println!`, `eprint!`, `eprintln!` macros as "unstable" - Added `process` as "unstable", re-exporting std types only for now +- Added `std::net` re-exports to the `net` submodule - Added `std::path::PathBuf` with all associated methods - Added `std::path::Path` with all associated methods - Added `stream::ExactSizeStream` as "unstable" - Added `stream::FusedStream` as "unstable" +- Added `stream::Product` +- Added `stream::Sum` +- Added `stream::from_fn` - Added `stream::interval` as "unstable" - Added `task::spawn_blocking` as "unstable", replacing `task::blocking` - Added `task::yield_now` - Added `write!` and `writeln!` macros as "unstable" -- Added `std::net` re-exports to the `net` submodule - Stabilized `future::join!` and `future::try_join!` - Stabilized `future::timeout` - Stabilized `path` From 802d4dfc3ba83f13ce1074f1eea60aec996d39f1 Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Wed, 16 Oct 2019 15:24:35 +0200 Subject: [PATCH 4/4] finalize changelog Signed-off-by: Yoshua Wuyts --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7e8731ff..f0e735a1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,12 +56,15 @@ while let Some(_) = interval.next().await { ## Added - Added `FutureExt` to the `prelude`, allowing us to extend `Future` +- Added `Stream::cmp` - Added `Stream::ge` +- Added `Stream::last` - Added `Stream::le` - Added `Stream::lt` - Added `Stream::merge` as "unstable", replacing `stream::join!` - Added `Stream::partial_cmp` - Added `Stream::take_while` +- Added `Stream::try_fold` - Added `future::IntoFuture` as "unstable" - Added `io::BufRead::split` - Added `io::Write::write_fmt` @@ -76,6 +79,7 @@ while let Some(_) = interval.next().await { - Added `stream::Sum` - Added `stream::from_fn` - Added `stream::interval` as "unstable" +- Added `stream::repeat_with` - Added `task::spawn_blocking` as "unstable", replacing `task::blocking` - Added `task::yield_now` - Added `write!` and `writeln!` macros as "unstable" @@ -93,6 +97,8 @@ while let Some(_) = interval.next().await { - Rewrote the README.md - Stabilized `io::Cursor` - Switched bors over to use GitHub actions +- Updated the `io` documentation to match std's `io` docs +- Updated the `task` documentation to match std's `thread` docs ## Removed