async-std v1.1.0 Release Notes
Release Date: 2019-11-21 // over 4 years ago-
๐ API Documentation
โฑ This patch introduces a faster scheduler algorithm,
Stream::throttle
, and stabilizestask::yield_now
. Additionally we're introducing several more stream APIs, bringing us to almost complete parity with the standard library.Furthermore our
path
submodule now returns more context in errors. So if opening a file fails, async-std will tell you which file was failed to open, making it easier to write and debug programs.Examples
let start = Instant::now(); let mut s = stream::interval(Duration::from_millis(5)) .throttle(Duration::from_millis(10)) .take(2); s.next().await; assert!(start.elapsed().as_millis() >= 5); s.next().await; assert!(start.elapsed().as_millis() >= 15); s.next().await; assert!(start.elapsed().as_millis() >= 25);
โ Added
- โ Added
Stream::throttle
as "unstable". - โ Added
Stream::count
as "unstable". - โ Added
Stream::max
as "unstable". - โ Added
Stream::successors
as "unstable". - โ Added
Stream::by_ref
as "unstable". - โ Added
Stream::partition
as "unstable". - โ Added contextual errors to the
path
submodule. - โ Added
os::windows::symlink_dir
as "unstable". - โ Added
os::windows::symlink_file
as "unstable". - Stabilized
task::yield_now
.
๐ Fixes
- ๐ We now ignore seek errors when rolling back failed
read
calls onFile
. - Fixed a bug where
Stream::max_by_key
was returning the wrong result. - Fixed a bug where
Stream::min_by_key
was returning the wrong result.
๐ Changed
- ๐ Applied various fixes to the tutorial.
- ๐ Fixed an issue with Clippy.
- โก๏ธ Optimized an internal code generation macro, improving compilation speeds.
- โ Removed an
Unpin
bound fromstream::Once
. - โ Removed various extra internal uses of
pin_mut!
. - Simplified
Stream::any
andStream::all
's internals. - The
surf
example is now enabled again. - ๐ Tweaked some streams internals.
- โก๏ธ Updated
futures-timer
to 2.0.0, improving compilation speed. - โฌ๏ธ Upgraded
async-macros
to 2.0.0. - ๐ค
Stream::merge
now uses randomized ordering to reduce overall latency. - โฑ The scheduler is now more efficient by keeping a slot for the next task to run. This is similar to Go's scheduler, and Tokio's scheduler.
- ๐ Fixed the documentation of the
channel
types to link back to thechannel
function.
- โ Added