Skip to content

Tokio v0.2.11

Compare
Choose a tag to compare
@carllerche carllerche released this 27 Jan 18:40
· 2063 commits to master since this release
00e3c29

Introduces select!, join!, and try_join! macros for waiting on multiple async operations concurrently from the same task. These macros are implemented primarily as declarative macros, which works around the recursion limit issue. The select! macro works with any type that implements Future and does not require special FusedFuture traits.

Fixes

  • docs: misc fixes and tweaks (#2155, #2103, #2027, #2167, #2175).
  • macros: handle generics in #[tokio::main] method (#2177).
  • sync: broadcast potential lost notifications (#2135).
  • rt: improve "no runtime" panic messages (#2145).

Added

  • optional support for using parking_lot internally (#2164).
  • fs: fs::copy, an async version of std::fs::copy (#2079).
  • macros: select! waits for the first branch to complete (#2152).
  • macros: join! waits for all branches to complete (#2158).
  • macros: try_join! waits for all branches to complete or the first error (#2169).
  • macros: pin! pins a value to the stack (#2163).
  • net: ReadHalf::poll() and ReadHalf::poll_peak (#2151)
  • stream: StreamExt::timeout() sets a per-item max duration (#2149).
  • stream: StreamExt::fold() applies a function, producing a single value. (#2122).
  • sync: impl Eq, PartialEq for oneshot::RecvError (#2168).
  • task: methods for inspecting the JoinError cause (#2051).