github tokio-rs/tokio tokio-0.2.10
Tokio v0.2.10

latest releases: tokio-util-0.7.11, tokio-1.37.0, tokio-test-0.4.4...
4 years ago

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] when rt-core feature flag is not enabled (#2139).
  • remove AsyncBufRead from BufStream impl block (#2108).
  • potential undefined behavior when implementing AsyncRead incorrectly (#2030).

Added

  • BufStream::with_capacity (#2125).
  • impl From and Default for RwLock (#2089).
  • io::ReadHalf::is_pair_of checks if provided WriteHalf 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 first None (#2085).
  • StreamExt::merge combines two streams, yielding values as they become ready (#2091).
  • Task-local storage (#2126).

Don't miss a new tokio release

NewReleases is sending notifications on new releases.