Tokio v0.2.10
carllerche
released this
21 Jan 21:44
·
2264 commits
to master
since this release
Introduces a task-local storage solution that works with Rust's "task" concept and supports multiplexing futures on the same runtime task (#2126). A number of other incremental improvements are included.
This release includes a few fixes, including fixing a scenario in which undefined behavior could be introduced when the user provided a buggy AsyncRead
implementation.
Fixes
#[tokio::main]
whenrt-core
feature flag is not enabled (#2139).- remove
AsyncBufRead
fromBufStream
impl block (#2108). - potential undefined behavior when implementing
AsyncRead
incorrectly (#2030).
Added
BufStream::with_capacity
(#2125).- impl
From
andDefault
forRwLock
(#2089). io::ReadHalf::is_pair_of
checks if providedWriteHalf
is for the same
underlying object (#1762, #2144).runtime::Handle::try_current()
returns a handle to the current runtime (#2118).stream::empty()
returns an immediately ready empty stream (#2092).stream::once(val)
returns a stream that yields a single value:val
(#2094).stream::pending()
returns a stream that never becomes ready (#2092).StreamExt::chain()
sequences a second stream after the first completes (#2093).StreamExt::collect()
transform a stream into a collection (#2109).StreamExt::fuse
ends the stream after the firstNone
(#2085).StreamExt::merge
combines two streams, yielding values as they become ready (#2091).- Task-local storage (#2126).