Skip to content

Releases: tokio-rs/tokio

Tokio v0.3.1

21 Oct 23:27
d14cbf9
Compare
Choose a tag to compare

This release fixes a use-after-free in the IO driver. Additionally, the read_buf
and write_buf methods have been added back to the IO traits, as the bytes crate
is now on track to reach version 1.0 together with Tokio.

Fixed

  • net: fix use-after-free (#3019).
  • fs: ensure buffered data is written on shutdown (#3009).

Added

  • io: copy_buf() (#2884).
  • io: AsyncReadExt::read_buf(), AsyncReadExt::write_buf() for working with
    Buf/BufMut (#3003).
  • rt: Runtime::spawn_blocking() (#2980).
  • sync: watch::Sender::is_closed() (#2991).

Tokio v0.3.0

15 Oct 16:31
12f1dff
Compare
Choose a tag to compare

This represents a 1.0 beta release. APIs are polished and future-proofed. APIs not included for 1.0 stabilization have been removed.

Biggest changes are:

  • I/O driver internal rewrite. The windows implementation includes significant
    changes.
  • Runtime API is polished, especially with how it interacts with feature flag
    combinations.
  • Feature flags are simplified
    • rt-core and rt-util are combined to rt
    • rt-threaded is renamed to rt-multi-thread to match builder API
    • tcp, udp, uds, dns are combied to net.
    • parking_lot is included with full

Changes

  • meta: Minimum supported Rust version is now 1.45.
  • io: AsyncRead trait now takes ReadBuf in order to safely handle reading
    into uninitialized memory (#2758).
  • io: Internal I/O driver storage is now able to compact (#2757).
  • rt: Runtime::block_on now takes &self (#2782).
  • sync: watch reworked to decouple receiving a change notification from
    receiving the value (#2814, #2806).
  • sync: Notify::notify is renamed to notify_one (#2822).
  • process: Child::kill is now an async fn that cleans zombies (#2823).
  • sync: use const fn constructors as possible (#2833, #2790)
  • signal: reduce cross-thread notification (#2835).
  • net: tcp,udp,uds types support operations with &self (#2828, #2919, #2934).
  • sync: blocking mpsc channel supports send with &self (#2861).
  • time: rename delay_for and delay_until to sleep and sleep_until (#2826).
  • io: upgrade to mio 0.7 (#2893).
  • io: AsyncSeek trait is tweaked (#2885).
  • fs: File operations take &self (#2930).
  • rt: runtime API, and #[tokio::main] macro polish (#2876)
  • rt: Runtime::enter uses an RAII guard instead of a closure (#2954).
  • net: the from_std function on all sockets no longer sets socket into non-blocking mode (#2893)

Added

  • sync: map function to lock guards (#2445).
  • sync: blocking_recv and blocking_send fns to mpsc for use outside of Tokio (#2685).
  • rt: Builder::thread_name_fn for configuring thread names (#1921).
  • fs: impl FromRawFd and FromRawHandle for File (#2792).
  • process: Child::wait and Child::try_wait (#2796).
  • rt: support configuring thread keep-alive duration (#2809).
  • rt: task::JoinHandle::abort forcibly cancels a spawned task (#2474).
  • sync: RwLock write guard to read guard downgrading (#2733).
  • net: add poll_* functions that take &self to all net types (#2845)
  • sync: get_mut() for Mutex, RwLock (#2856).
  • sync: mpsc::Sender::closed() waits for Receiver half to close (#2840).
  • sync: mpsc::Sender::is_closed() returns true if Receiver half is closed (#2726).
  • stream: iter and iter_mut to StreamMap (#2890).
  • net: implement AsRawSocket on windows (#2911).
  • net: TcpSocket creates a socket without binding or listening (#2920).

Removed

  • io: vectored ops are removed from AsyncRead, AsyncWrite traits (#2882).
  • io: mio is removed from the public API. PollEvented and Registration are
    removed (#2893).
  • io: remove bytes from public API. Buf and BufMut implementation are
    removed (#2908).
  • time: DelayQueue is moved to tokio-util (#2897).

Fixed

  • io: stdout and stderr buffering on windows (#2734).

Tokio v0.2.22

22 Jul 00:55
21f7260
Compare
Choose a tag to compare

This release introduces initial support for tracing instrumentation within the Tokio
runtime, enabled by the "tracing" feature flag. In addition, it contains a number of bug
fixes and API additions.

Fixes

Changes

  • coop: returning Poll::Pending no longer decrements the task budget (#2549)

Added

  • io: little-endian variants of AsyncReadExt and AsyncWriteExt methods
    (#1915)
  • task: add tracing instrumentation to spawned tasks (#2655)
  • sync: allow unsized types in Mutex and RwLock (via default constructors)
    (#2615)
  • net: add ToSocketAddrs implementation for &[SocketAddr] (#2604)
  • fs: add OpenOptionsExt for OpenOptions (#2515)
  • fs: add DirBuilder (#2524)

Signed-off-by: Eliza Weisman eliza@buoyant.io

Tokio v0.2.21

13 May 19:08
02661ba
Compare
Choose a tag to compare

Bug fixes and API polish.

Fixes

  • macros: disambiguate built-in #[test] attribute in macro expansion (#2503)
  • rt: LocalSet and task budgeting (#2462).
  • rt: task budgeting with block_in_place (#2502).
  • sync: release broadcast channel memory without sending a value (#2509).
  • time: notify when resetting a Delay to a time in the past (#2290).

Added

  • io: get_mut, get_ref, and into_inner to Lines (#2450).
  • io: mio::Ready argument to PollEvented (#2419).
  • os: illumos support (#2486).
  • rt: Handle::spawn_blocking (#2501).
  • sync: OwnedMutexGuard for Arc<Mutex<T>> (#2455).

Tokio v0.2.20

28 Apr 23:35
0f4287a
Compare
Choose a tag to compare

Fixes

  • sync: broadcast closing the channel no longer requires capacity (#2448).
  • rt: regression when configuring runtime with max_threads less than the number of CPUs (#2457).

Tokio v0.2.19

24 Apr 22:18
ce9eabf
Compare
Choose a tag to compare

Fixes

Added

  • rt: runtime::Handle::block_on (#2437).
  • sync: owned Semaphore permit (#2421).
  • tcp: owned split (#2270).

Tokio v0.2.18

13 Apr 03:45
5376f91
Compare
Choose a tag to compare

Fixes a regression with LocalSet that allowed !Send futures to cross threads.

This change makes LocalSet !Send. The Send implementation was accidentally added in v0.2.14. Removing the Send implementation is not considered a breaking change as it fixes a soundness bug and the implementation was accidental.

Fixes

  • task: LocalSet was incorrectly marked as Send (#2398)
  • io: correctly report WriteZero failure in write_int (#2334)

Tokio 0.2.17

09 Apr 20:54
3137c6f
Compare
Choose a tag to compare

This release fixes a bug in the threaded scheduler that could result in panics under load (see #2382). Additionally, the default number of worker threads now uses the logical CPU count, so it will now respect scheduler affinity and cgroups CPU quotas.

Fixes

  • rt: bug in work-stealing queue (#2387)

Changes

  • rt: threadpool uses logical CPU count instead of physical by default (#2391)

Tokio 0.2.16

04 Apr 00:05
d883ac0
Compare
Choose a tag to compare

This release fixes a regression in tokio::sync and a bug in tokio::fs::copy. It also
adds a new APIs to tokio::time and tokio::io.

Fixes

  • sync: fix a regression where Mutex, Semaphore, and RwLock futures no
    longer implement Sync (#2375)
  • fs: fix fs::copy not copying file permissions (#2354)

Added

  • time: added deadline method to delay_queue::Expired (#2300)
  • io: added StreamReader (#2052)

Tokio v0.2.15

02 Apr 16:44
2a8d917
Compare
Choose a tag to compare

Fixes a queue regression and adds a new disarm fn to mpsc::Sender.

Fixes

  • rt: fix queue regression (#2362).

Added

  • sync: Add disarm to mpsc::Sender (#2358).