v1.9.0
Happy New Year everyone! This patch stabilizes the async_std::channel
submodule, removes the deprecated sync::channel types, and introduces the
tokio1 feature.
New Channels
As part of our 1.8.0 release last month we introduced the new
async_std::channel submodule and deprecated the unstable
async_std::sync::channel types. You can read our full motiviation for this
change in the last patch notes. But the short version is that the old
channels had some fundamental problems, and the sync submodule is a bit of
a mess.
This release of async-std promotes async_std::channel to stable, and
fully removes the async_std::sync::channel types. In practice many
libraries have already been upgraded to the new channels in the past month,
and this will enable much of the ecosystem to switch off "unstable" versions
of async-std.
use async_std::channel;
let (sender, receiver) = channel::unbounded();
assert_eq!(sender.send("Hello").await, Ok(()));
assert_eq!(receiver.recv().await, Ok("Hello"));Tokio 1.0 compat
The Tokio project recently released version 1.0 of their runtime, and the
async-std team would like to congratulate the Tokio team on achieving this
milestone.
This release of async-std adds the tokio1 feature flag, enabling Tokio's
TLS constructors to be initialized within the async-std runtime. This is in
addition to the tokio02 and tokio03 feature flags which we were already
exposing.
In terms of stability it's worth noting that we will continue to provide
support for the tokio02, tokio03, and tokio1 on the current major
release line of async-std. These flags are part of our public API, and
removing compat support for older Tokio versions is considered a breaking
change.
Added
Removed
- Removed deprecated
sync::channel(#933)
Fixed
- Fixed a typo for [sic]
FuturesExttrait (#930) - Update the link to
cargo-editin the installation section of the docs (#932) - Fixed a small typo for stream (#926)