From a6dd24a1e42ef3ce52a096b9c2ae2de6bbae17a3 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Tue, 15 Feb 2022 12:18:54 -0800 Subject: [PATCH 1/4] chore: prepare Tokio v1.16.2 release # 1.16.2 (February 15, 2022) This release updates the minimum supported Rust version (MSRV) to 1.49, the `mio` dependency to v0.8, and the (optional) `parking_lot` dependency to v0.12. Additionally, it contains several bug fixes, as well as internal refactoring and performance improvements. ### Fixed - time: prevent panicking in `sleep` with large durations ([#4495]) - time: eliminate potential panics in `Instant` arithmetic on platforms where `Instant::now` is not monotonic ([#4461]) - io: fix `DuplexStream` not participating in cooperative yielding ([#4478]) - rt: fix potential double panic when dropping a `JoinHandle` ([#4430]) ### Changed - update minimum supported Rust version to 1.49 ([#4457]) - update `parking_lot` dependency to v0.12.0 ([#4459]) - update `mio` dependency to v0.8 ([#4449]) - rt: remove an unnecessary lock in the blocking pool ([#4436]) - rt: remove an unnecessary enum in the basic scheduler ([#4462]) - time: use bit manipulation instead of modulo to improve performance ([#4480]) - net: use `std::future::Ready` instead of our own `Ready` future ([#4271]) - replace deprecated `atomic::spin_loop_hint` with `hint::spin_loop` ([#4491]) - fix miri failures in intrusive linked lists ([#4397]) ### Documented - io: add an example for `tokio::process::ChildStdin` ([#4479]) ### Unstable The following changes only apply when building with `--cfg tokio_unstable`: - task: fix missing location information in `tracing` spans generated by `spawn_local` ([#4483]) - task: add `JoinSet` for managing sets of tasks ([#4335]) - metrics: fix compilation error on MIPS ([#4475]) - metrics: fix compilation error on arm32v7 ([#4453]) [#4495]: https://github.com/tokio-rs/tokio/pull/4495 [#4461]: https://github.com/tokio-rs/tokio/pull/4461 [#4478]: https://github.com/tokio-rs/tokio/pull/4478 [#4430]: https://github.com/tokio-rs/tokio/pull/4430 [#4457]: https://github.com/tokio-rs/tokio/pull/4457 [#4459]: https://github.com/tokio-rs/tokio/pull/4459 [#4449]: https://github.com/tokio-rs/tokio/pull/4449 [#4462]: https://github.com/tokio-rs/tokio/pull/4462 [#4436]: https://github.com/tokio-rs/tokio/pull/4436 [#4480]: https://github.com/tokio-rs/tokio/pull/4480 [#4271]: https://github.com/tokio-rs/tokio/pull/4271 [#4491]: https://github.com/tokio-rs/tokio/pull/4491 [#4397]: https://github.com/tokio-rs/tokio/pull/4397 [#4479]: https://github.com/tokio-rs/tokio/pull/4479 [#4483]: https://github.com/tokio-rs/tokio/pull/4483 [#4335]: https://github.com/tokio-rs/tokio/pull/4335 [#4475]: https://github.com/tokio-rs/tokio/pull/4475 [#4453]: https://github.com/tokio-rs/tokio/pull/4453 --- tokio-stream/src/lib.rs | 6 ++-- tokio-stream/src/stream_map.rs | 4 +-- tokio-test/src/lib.rs | 2 +- tokio/CHANGELOG.md | 60 ++++++++++++++++++++++++++++++++++ tokio/Cargo.toml | 2 +- 5 files changed, 67 insertions(+), 7 deletions(-) diff --git a/tokio-stream/src/lib.rs b/tokio-stream/src/lib.rs index f600ccb8d36..7a7e8645612 100644 --- a/tokio-stream/src/lib.rs +++ b/tokio-stream/src/lib.rs @@ -64,9 +64,9 @@ //! types when the io feature is enabled. //! //! [`tokio-util`]: https://docs.rs/tokio-util/0.4/tokio_util/codec/index.html -//! [`tokio::io`]: https://docs.rs/tokio/1.0/tokio/io/index.html -//! [`AsyncRead`]: https://docs.rs/tokio/1.0/tokio/io/trait.AsyncRead.html -//! [`AsyncWrite`]: https://docs.rs/tokio/1.0/tokio/io/trait.AsyncWrite.html +//! [`tokio::io`]: https://docs.rs/tokio/1.16.2/tokio/io/index.html +//! [`AsyncRead`]: https://docs.rs/tokio/1.16.2/tokio/io/trait.AsyncRead.html +//! [`AsyncWrite`]: https://docs.rs/tokio/1.16.2/tokio/io/trait.AsyncWrite.html //! [`ReaderStream`]: https://docs.rs/tokio-util/0.4/tokio_util/io/struct.ReaderStream.html //! [`StreamReader`]: https://docs.rs/tokio-util/0.4/tokio_util/io/struct.StreamReader.html diff --git a/tokio-stream/src/stream_map.rs b/tokio-stream/src/stream_map.rs index 215980474b1..504b0207ecd 100644 --- a/tokio-stream/src/stream_map.rs +++ b/tokio-stream/src/stream_map.rs @@ -43,8 +43,8 @@ use std::task::{Context, Poll}; /// [`mpsc`] channel. /// /// [`StreamExt::merge`]: crate::StreamExt::merge -/// [`mpsc`]: https://docs.rs/tokio/1.0/tokio/sync/mpsc/index.html -/// [`pin!`]: https://docs.rs/tokio/1.0/tokio/macro.pin.html +/// [`mpsc`]: https://docs.rs/tokio/1.16.2/tokio/sync/mpsc/index.html +/// [`pin!`]: https://docs.rs/tokio/1.16.2/tokio/macro.pin.html /// [`Box::pin`]: std::boxed::Box::pin /// /// # Examples diff --git a/tokio-test/src/lib.rs b/tokio-test/src/lib.rs index de3f0864a94..a991bc7db94 100644 --- a/tokio-test/src/lib.rs +++ b/tokio-test/src/lib.rs @@ -22,7 +22,7 @@ pub mod task; /// For more information, see the documentation for /// [`tokio::runtime::Runtime::block_on`][runtime-block-on]. /// -/// [runtime-block-on]: https://docs.rs/tokio/1.3.0/tokio/runtime/struct.Runtime.html#method.block_on +/// [runtime-block-on]: https://docs.rs/tokio/1.16.2/tokio/runtime/struct.Runtime.html#method.block_on pub fn block_on(future: F) -> F::Output { use tokio::runtime; diff --git a/tokio/CHANGELOG.md b/tokio/CHANGELOG.md index 4a2eafe0f18..df0f4abdb0c 100644 --- a/tokio/CHANGELOG.md +++ b/tokio/CHANGELOG.md @@ -1,3 +1,63 @@ +# 1.16.2 (February 15, 2022) + +This release updates the minimum supported Rust version (MSRV) to 1.49, the +`mio` dependency to v0.8, and the (optional) `parking_lot` dependency to v0.12. +Additionally, it contains several bug fixes, as well as internal refactoring and +performance improvements. + +### Fixed + +- time: prevent panicking in `sleep` with large durations ([#4495]) +- time: eliminate potential panics in `Instant` arithmetic on platforms where + `Instant::now` is not monotonic ([#4461]) +- io: fix `DuplexStream` not participating in cooperative yielding ([#4478]) +- rt: fix potential double panic when dropping a `JoinHandle` ([#4430]) + +### Changed + +- update minimum supported Rust version to 1.49 ([#4457]) +- update `parking_lot` dependency to v0.12.0 ([#4459]) +- update `mio` dependency to v0.8 ([#4449]) +- rt: remove an unnecessary lock in the blocking pool ([#4436]) +- rt: remove an unnecessary enum in the basic scheduler ([#4462]) +- time: use bit manipulation instead of modulo to improve performance ([#4480]) +- net: use `std::future::Ready` instead of our own `Ready` future ([#4271]) +- replace deprecated `atomic::spin_loop_hint` with `hint::spin_loop` ([#4491]) +- fix miri failures in intrusive linked lists ([#4397]) + +### Documented + +- io: add an example for `tokio::process::ChildStdin` ([#4479]) + +### Unstable + +The following changes only apply when building with `--cfg tokio_unstable`: + +- task: fix missing location information in `tracing` spans generated by + `spawn_local` ([#4483]) +- task: add `JoinSet` for managing sets of tasks ([#4335]) +- metrics: fix compilation error on MIPS ([#4475]) +- metrics: fix compilation error on arm32v7 ([#4453]) + +[#4495]: https://github.com/tokio-rs/tokio/pull/4495 +[#4461]: https://github.com/tokio-rs/tokio/pull/4461 +[#4478]: https://github.com/tokio-rs/tokio/pull/4478 +[#4430]: https://github.com/tokio-rs/tokio/pull/4430 +[#4457]: https://github.com/tokio-rs/tokio/pull/4457 +[#4459]: https://github.com/tokio-rs/tokio/pull/4459 +[#4449]: https://github.com/tokio-rs/tokio/pull/4449 +[#4462]: https://github.com/tokio-rs/tokio/pull/4462 +[#4436]: https://github.com/tokio-rs/tokio/pull/4436 +[#4480]: https://github.com/tokio-rs/tokio/pull/4480 +[#4271]: https://github.com/tokio-rs/tokio/pull/4271 +[#4491]: https://github.com/tokio-rs/tokio/pull/4491 +[#4397]: https://github.com/tokio-rs/tokio/pull/4397 +[#4479]: https://github.com/tokio-rs/tokio/pull/4479 +[#4483]: https://github.com/tokio-rs/tokio/pull/4483 +[#4335]: https://github.com/tokio-rs/tokio/pull/4335 +[#4475]: https://github.com/tokio-rs/tokio/pull/4475 +[#4453]: https://github.com/tokio-rs/tokio/pull/4453 + # 1.16.1 (January 28, 2022) This release fixes a bug in [#4428] with the change [#4437]. diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 5c3a2cffc38..4b2f30c446e 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -6,7 +6,7 @@ name = "tokio" # - README.md # - Update CHANGELOG.md. # - Create "v1.0.x" git tag. -version = "1.16.1" +version = "1.16.2" edition = "2018" rust-version = "1.49" authors = ["Tokio Contributors "] From 000fc8047824673793fa33ad74e93ae653558218 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Tue, 15 Feb 2022 14:11:54 -0800 Subject: [PATCH 2/4] change version to 1.17.0 --- README.md | 2 +- tokio-stream/src/lib.rs | 6 +++--- tokio-stream/src/stream_map.rs | 4 ++-- tokio-test/src/lib.rs | 2 +- tokio/CHANGELOG.md | 2 +- tokio/Cargo.toml | 2 +- tokio/README.md | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 877f84283d4..1cce34aeeff 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml: ```toml [dependencies] -tokio = { version = "1.16.1", features = ["full"] } +tokio = { version = "1.17.0", features = ["full"] } ``` Then, on your main.rs: diff --git a/tokio-stream/src/lib.rs b/tokio-stream/src/lib.rs index 7a7e8645612..729e88f6738 100644 --- a/tokio-stream/src/lib.rs +++ b/tokio-stream/src/lib.rs @@ -64,9 +64,9 @@ //! types when the io feature is enabled. //! //! [`tokio-util`]: https://docs.rs/tokio-util/0.4/tokio_util/codec/index.html -//! [`tokio::io`]: https://docs.rs/tokio/1.16.2/tokio/io/index.html -//! [`AsyncRead`]: https://docs.rs/tokio/1.16.2/tokio/io/trait.AsyncRead.html -//! [`AsyncWrite`]: https://docs.rs/tokio/1.16.2/tokio/io/trait.AsyncWrite.html +//! [`tokio::io`]: https://docs.rs/tokio/1.17.0/tokio/io/index.html +//! [`AsyncRead`]: https://docs.rs/tokio/1.17.0/tokio/io/trait.AsyncRead.html +//! [`AsyncWrite`]: https://docs.rs/tokio/1.17.0/tokio/io/trait.AsyncWrite.html //! [`ReaderStream`]: https://docs.rs/tokio-util/0.4/tokio_util/io/struct.ReaderStream.html //! [`StreamReader`]: https://docs.rs/tokio-util/0.4/tokio_util/io/struct.StreamReader.html diff --git a/tokio-stream/src/stream_map.rs b/tokio-stream/src/stream_map.rs index 504b0207ecd..b2fcb6731d9 100644 --- a/tokio-stream/src/stream_map.rs +++ b/tokio-stream/src/stream_map.rs @@ -43,8 +43,8 @@ use std::task::{Context, Poll}; /// [`mpsc`] channel. /// /// [`StreamExt::merge`]: crate::StreamExt::merge -/// [`mpsc`]: https://docs.rs/tokio/1.16.2/tokio/sync/mpsc/index.html -/// [`pin!`]: https://docs.rs/tokio/1.16.2/tokio/macro.pin.html +/// [`mpsc`]: https://docs.rs/tokio/1.17.0/tokio/sync/mpsc/index.html +/// [`pin!`]: https://docs.rs/tokio/1.17.0/tokio/macro.pin.html /// [`Box::pin`]: std::boxed::Box::pin /// /// # Examples diff --git a/tokio-test/src/lib.rs b/tokio-test/src/lib.rs index a991bc7db94..58dc03e3e58 100644 --- a/tokio-test/src/lib.rs +++ b/tokio-test/src/lib.rs @@ -22,7 +22,7 @@ pub mod task; /// For more information, see the documentation for /// [`tokio::runtime::Runtime::block_on`][runtime-block-on]. /// -/// [runtime-block-on]: https://docs.rs/tokio/1.16.2/tokio/runtime/struct.Runtime.html#method.block_on +/// [runtime-block-on]: https://docs.rs/tokio/1.17.0/tokio/runtime/struct.Runtime.html#method.block_on pub fn block_on(future: F) -> F::Output { use tokio::runtime; diff --git a/tokio/CHANGELOG.md b/tokio/CHANGELOG.md index df0f4abdb0c..2f0640fed46 100644 --- a/tokio/CHANGELOG.md +++ b/tokio/CHANGELOG.md @@ -1,4 +1,4 @@ -# 1.16.2 (February 15, 2022) +# 1.17.0 (February 15, 2022) This release updates the minimum supported Rust version (MSRV) to 1.49, the `mio` dependency to v0.8, and the (optional) `parking_lot` dependency to v0.12. diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 4b2f30c446e..ba165d2556c 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -6,7 +6,7 @@ name = "tokio" # - README.md # - Update CHANGELOG.md. # - Create "v1.0.x" git tag. -version = "1.16.2" +version = "1.17.0" edition = "2018" rust-version = "1.49" authors = ["Tokio Contributors "] diff --git a/tokio/README.md b/tokio/README.md index 877f84283d4..1cce34aeeff 100644 --- a/tokio/README.md +++ b/tokio/README.md @@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml: ```toml [dependencies] -tokio = { version = "1.16.1", features = ["full"] } +tokio = { version = "1.17.0", features = ["full"] } ``` Then, on your main.rs: From eff23b3bbbba08beb961a2bd30427cc1306f9e90 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Wed, 16 Feb 2022 10:18:22 -0800 Subject: [PATCH 3/4] undo docs version changes as per the discussion [here][1], we should probably address these separately. [1]: https://github.com/tokio-rs/tokio/pull/4504#discussion_r807723771 --- tokio-stream/src/lib.rs | 6 +++--- tokio-stream/src/stream_map.rs | 4 ++-- tokio-test/src/lib.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tokio-stream/src/lib.rs b/tokio-stream/src/lib.rs index 729e88f6738..f600ccb8d36 100644 --- a/tokio-stream/src/lib.rs +++ b/tokio-stream/src/lib.rs @@ -64,9 +64,9 @@ //! types when the io feature is enabled. //! //! [`tokio-util`]: https://docs.rs/tokio-util/0.4/tokio_util/codec/index.html -//! [`tokio::io`]: https://docs.rs/tokio/1.17.0/tokio/io/index.html -//! [`AsyncRead`]: https://docs.rs/tokio/1.17.0/tokio/io/trait.AsyncRead.html -//! [`AsyncWrite`]: https://docs.rs/tokio/1.17.0/tokio/io/trait.AsyncWrite.html +//! [`tokio::io`]: https://docs.rs/tokio/1.0/tokio/io/index.html +//! [`AsyncRead`]: https://docs.rs/tokio/1.0/tokio/io/trait.AsyncRead.html +//! [`AsyncWrite`]: https://docs.rs/tokio/1.0/tokio/io/trait.AsyncWrite.html //! [`ReaderStream`]: https://docs.rs/tokio-util/0.4/tokio_util/io/struct.ReaderStream.html //! [`StreamReader`]: https://docs.rs/tokio-util/0.4/tokio_util/io/struct.StreamReader.html diff --git a/tokio-stream/src/stream_map.rs b/tokio-stream/src/stream_map.rs index b2fcb6731d9..215980474b1 100644 --- a/tokio-stream/src/stream_map.rs +++ b/tokio-stream/src/stream_map.rs @@ -43,8 +43,8 @@ use std::task::{Context, Poll}; /// [`mpsc`] channel. /// /// [`StreamExt::merge`]: crate::StreamExt::merge -/// [`mpsc`]: https://docs.rs/tokio/1.17.0/tokio/sync/mpsc/index.html -/// [`pin!`]: https://docs.rs/tokio/1.17.0/tokio/macro.pin.html +/// [`mpsc`]: https://docs.rs/tokio/1.0/tokio/sync/mpsc/index.html +/// [`pin!`]: https://docs.rs/tokio/1.0/tokio/macro.pin.html /// [`Box::pin`]: std::boxed::Box::pin /// /// # Examples diff --git a/tokio-test/src/lib.rs b/tokio-test/src/lib.rs index 58dc03e3e58..de3f0864a94 100644 --- a/tokio-test/src/lib.rs +++ b/tokio-test/src/lib.rs @@ -22,7 +22,7 @@ pub mod task; /// For more information, see the documentation for /// [`tokio::runtime::Runtime::block_on`][runtime-block-on]. /// -/// [runtime-block-on]: https://docs.rs/tokio/1.17.0/tokio/runtime/struct.Runtime.html#method.block_on +/// [runtime-block-on]: https://docs.rs/tokio/1.3.0/tokio/runtime/struct.Runtime.html#method.block_on pub fn block_on(future: F) -> F::Output { use tokio::runtime; From 86b601c1b6d68b2cb68a9434377cabc74f91feda Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Wed, 16 Feb 2022 10:19:52 -0800 Subject: [PATCH 4/4] update date --- tokio/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio/CHANGELOG.md b/tokio/CHANGELOG.md index 2f0640fed46..3f69f09364f 100644 --- a/tokio/CHANGELOG.md +++ b/tokio/CHANGELOG.md @@ -1,4 +1,4 @@ -# 1.17.0 (February 15, 2022) +# 1.17.0 (February 16, 2022) This release updates the minimum supported Rust version (MSRV) to 1.49, the `mio` dependency to v0.8, and the (optional) `parking_lot` dependency to v0.12.