Skip to content

Update Rust crate tokio to 1.32

Renovate Bot requested to merge renovate/tokio-1.x into main

This MR contains the following updates:

Package Type Update Change
tokio (source) dependencies minor 1.0 -> 1.32

Release Notes

tokio-rs/tokio (tokio)

v1.32.0: Tokio v1.32.0

Compare Source

Fixed
  • sync: fix potential quadradic behavior in broadcast::Receiver (#​5925)
Added
  • process: stabilize Command::raw_arg (#​5930)
  • io: enable awaiting error readiness (#​5781)
Unstable
  • rt(alt): improve the scalability of alt runtime as the number of cores grows (#​5935)

v1.31.0: Tokio v1.31.0

Compare Source

Fixed
  • io: delegate WriteHalf::poll_write_vectored (#​5914)
Unstable
  • rt(unstable): fix memory leak in unstable next-gen scheduler prototype (#​5911)
  • rt: expose mean task poll time metric (#​5927)

v1.30.0: Tokio v1.30.0

Compare Source

1.30.0 (August 9, 2023)

This release bumps the MSRV of Tokio to 1.63. (#​5887)

Changed
  • tokio: reduce LLVM code generation (#​5859)
  • io: support --cfg mio_unsupported_force_poll_poll flag (#​5881)
  • sync: make const_new methods always available (#​5885)
  • sync: avoid false sharing in mpsc channel (#​5829)
  • rt: pop at least one task from inject queue (#​5908)
Added
  • sync: add broadcast::Sender::new (#​5824)
  • net: implement UCred for espidf (#​5868)
  • fs: add File::options() (#​5869)
  • time: implement extra reset variants for Interval (#​5878)
  • process: add {ChildStd*}::into_owned_{fd, handle} (#​5899)
Removed
  • tokio: removed unused tokio_* cfgs (#​5890)
  • remove build script to speed up compilation (#​5887)
Documented
  • sync: mention lagging in docs for broadcast::send (#​5820)
  • runtime: expand on sharing runtime docs (#​5858)
  • io: use vec in example for AsyncReadExt::read_exact (#​5863)
  • time: mark Sleep as !Unpin in docs (#​5916)
  • process: fix raw_arg not showing up in docs (#​5865)
Unstable
  • rt: add runtime ID (#​5864)
  • rt: initial implementation of new threaded runtime (#​5823)

v1.29.1: Tokio v1.29.1

Compare Source

Fixed
  • rt: fix nesting two block_in_place with a block_on between (#​5837)

v1.29.0: Tokio v1.29.0

Compare Source

Technically a breaking change, the Send implementation is removed from runtime::EnterGuard. This change fixes a bug and should not impact most users.

Breaking
  • rt: EnterGuard should not be Send (#​5766)
Fixed
  • fs: reduce blocking ops in fs::read_dir (#​5653)
  • rt: fix possible starvation (#​5686, #​5712)
  • rt: fix stacked borrows issue in JoinSet (#​5693)
  • rt: panic if EnterGuard dropped incorrect order (#​5772)
  • time: do not overflow to signal value (#​5710)
  • fs: wait for in-flight ops before cloning File (#​5803)
Changed
  • rt: reduce time to poll tasks scheduled from outside the runtime (#​5705, #​5720)
Added
  • net: add uds doc alias for unix sockets (#​5659)
  • rt: add metric for number of tasks (#​5628)
  • sync: implement more traits for channel errors (#​5666)
  • net: add nodelay methods on TcpSocket (#​5672)
  • sync: add broadcast::Receiver::blocking_recv (#​5690)
  • process: add raw_arg method to Command (#​5704)
  • io: support PRIORITY epoll events (#​5566)
  • task: add JoinSet::poll_join_next (#​5721)
  • net: add support for Redox OS (#​5790)
Unstable

v1.28.2: Tokio v1.28.2

Compare Source

1.28.2 (May 28, 2023)

Forward ports 1.18.6 changes.

Fixed
  • deps: disable default features for mio (#​5728)

v1.28.1: Tokio v1.28.1

Compare Source

1.28.1 (May 10th, 2023)

This release fixes a mistake in the build script that makes AsFd implementations unavailable on Rust 1.63. (#​5677)

v1.28.0: Tokio v1.28.0

Compare Source

1.28.0 (April 25th, 2023)

Added
  • io: add AsyncFd::async_io (#​5542)
  • io: impl BufMut for ReadBuf (#​5590)
  • net: add recv_buf for UdpSocket and UnixDatagram (#​5583)
  • sync: add OwnedSemaphorePermit::semaphore (#​5618)
  • sync: add same_channel to broadcast channel (#​5607)
  • sync: add watch::Receiver::wait_for (#​5611)
  • task: add JoinSet::spawn_blocking and JoinSet::spawn_blocking_on (#​5612)
Changed
  • deps: update windows-sys to 0.48 (#​5591)
  • io: make read_to_end not grow unnecessarily (#​5610)
  • macros: make entrypoints more efficient (#​5621)
  • sync: improve Debug impl for RwLock (#​5647)
  • sync: reduce contention in Notify (#​5503)
Fixed
  • net: support get_peer_cred on AIX (#​5065)
  • sync: avoid deadlocks in broadcast with custom wakers (#​5578)
Documented
  • sync: fix typo in Semaphore::MAX_PERMITS (#​5645)
  • sync: fix typo in tokio::sync::watch::Sender docs (#​5587)

v1.27.0: Tokio v1.27.0

Compare Source

1.27.0 (March 27th, 2023)

This release bumps the MSRV of Tokio to 1.56. (#​5559)

Added
  • io: add async_io helper method to sockets (#​5512)
  • io: add implementations of AsFd/AsHandle/AsSocket (#​5514, #​5540)
  • net: add UdpSocket::peek_sender() (#​5520)
  • sync: add RwLockWriteGuard::{downgrade_map, try_downgrade_map} (#​5527)
  • task: add JoinHandle::abort_handle (#​5543)
Changed
  • io: use memchr from libc (#​5558)
  • macros: accept path as crate rename in #[tokio::main] (#​5557)
  • macros: update to syn 2.0.0 (#​5572)
  • time: don't register for a wakeup when Interval returns Ready (#​5553)
Fixed
  • fs: fuse std iterator in ReadDir (#​5555)
  • tracing: fix spawn_blocking location fields (#​5573)
  • time: clean up redundant check in Wheel::poll() (#​5574)
Documented
  • macros: define cancellation safety (#​5525)
  • io: add details to docs of tokio::io::copy[_buf] (#​5575)
  • io: refer to ReaderStream and StreamReader in module docs (#​5576)

v1.26.0: Tokio v1.26.0

Compare Source

Fixed
Added
Changed
Internal Changes
Unstable
Documented

v1.25.1: Tokio v1.25.1

Compare Source

1.25.1 (May 28, 2023)

Forward ports 1.18.6 changes.

Fixed
  • deps: disable default features for mio (#​5728)

v1.25.0: Tokio v1.25.0

1.25.0 (January 28, 2023)

Fixed
  • rt: fix runtime metrics reporting (#​5330)
Added
  • sync: add broadcast::Sender::len (#​5343)
Changed
  • fs: increase maximum read buffer size to 2MiB (#​5397)

v1.24.1: Tokio v1.24.1

Compare Source

This release fixes a compilation failure on targets without AtomicU64 when using rustc older than 1.63. (#​5356)

v1.24.0: Tokio v1.24.0

Compare Source

The highlight of this release is the reduction of lock contention for all I/O operations (#​5300). We have received reports of up to a 20% improvement in CPU utilization and increased throughput for real-world I/O heavy applications.

Fixed
  • rt: improve native AtomicU64 support detection (#​5284)
Added
  • rt: add configuration option for max number of I/O events polled from the OS per tick (#​5186)
  • rt: add an environment variable for configuring the default number of worker threads per runtime instance (#​4250)
Changed
  • sync: reduce MPSC channel stack usage (#​5294)
  • io: reduce lock contention in I/O operations (#​5300)
  • fs: speed up read_dir() by chunking operations (#​5309)
  • rt: use internal ThreadId implementation (#​5329)
  • test: don't auto-advance time when a spawn_blocking task is running (#​5115)

v1.23.1: Tokio v1.23.1

Compare Source

This release forward ports changes from 1.18.4.

Fixed
  • net: fix Windows named pipe server builder to maintain option when toggling pipe mode (#​5336).

v1.23.0: Tokio v1.23.0

Compare Source

Fixed
  • net: fix Windows named pipe connect (#​5208)
  • io: support vectored writes for ChildStdin (#​5216)
  • io: fix async fn ready() false positive for OS-specific events (#​5231)
Changed
  • runtime: yield_now defers task until after driver poll (#​5223)
  • runtime: reduce amount of codegen needed per spawned task (#​5213)
  • windows: replace winapi dependency with windows-sys (#​5204)

v1.22.0: Tokio v1.22.0

Compare Source

Added
  • runtime: add Handle::runtime_flavor (#​5138)
  • sync: add Mutex::blocking_lock_owned (#​5130)
  • sync: add Semaphore::MAX_PERMITS (#​5144)
  • sync: add merge() to semaphore permits (#​4948)
  • sync: add mpsc::WeakUnboundedSender (#​5189)
Added (unstable)
  • process: add Command::process_group (#​5114)
  • runtime: export metrics about the blocking thread pool (#​5161)
  • task: add task::id() and task::try_id() (#​5171)
Fixed
  • macros: don't take ownership of futures in macros (#​5087)
  • runtime: fix Stacked Borrows violation in LocalOwnedTasks (#​5099)
  • runtime: mitigate ABA with 32-bit queue indices when possible (#​5042)
  • task: wake local tasks to the local queue when woken by the same thread (#​5095)
  • time: panic in release mode when mark_pending called illegally (#​5093)
  • runtime: fix typo in expect message (#​5169)
  • runtime: fix unsync_load on atomic types (#​5175)
  • task: elaborate safety comments in task deallocation (#​5172)
  • runtime: fix LocalSet drop in thread local (#​5179)
  • net: remove libc type leakage in a public API (#​5191)
  • runtime: update the alignment of CachePadded (#​5106)
Changed
  • io: make tokio::io::copy continue filling the buffer when writer stalls (#​5066)
  • runtime: remove coop::budget from LocalSet::run_until (#​5155)
  • sync: make Notify panic safe (#​5154)
Documented
  • io: fix doc for write_i8 to use signed integers (#​5040)
  • net: fix doc typos for TCP and UDP set_tos methods (#​5073)
  • net: fix function name in UdpSocket::recv documentation (#​5150)
  • sync: typo in TryLockError for RwLock::try_write (#​5160)
  • task: document that spawned tasks execute immediately (#​5117)
  • time: document return type of timeout (#​5118)
  • time: document that timeout checks only before poll (#​5126)
  • sync: specify return type of oneshot::Receiver in docs (#​5198)
Internal changes
  • runtime: use const Mutex::new for globals (#​5061)
  • runtime: remove Option around mio::Events in io driver (#​5078)
  • runtime: remove a conditional compilation clause (#​5104)
  • runtime: remove a reference to internal time handle (#​5107)
  • runtime: misc time driver cleanup (#​5120)
  • runtime: move signal driver to runtime module (#​5121)
  • runtime: signal driver now uses I/O driver directly (#​5125)
  • runtime: start decoupling I/O driver and I/O handle (#​5127)
  • runtime: switch io::handle refs with scheduler:Handle (#​5128)
  • runtime: remove Arc from I/O driver (#​5134)
  • runtime: use signal driver handle via scheduler::Handle (#​5135)
  • runtime: move internal clock fns out of context (#​5139)
  • runtime: remove runtime::context module (#​5140)
  • runtime: keep driver cfgs in driver.rs (#​5141)
  • runtime: add runtime::context to unify thread-locals (#​5143)
  • runtime: rename some confusing internal variables/fns (#​5151)
  • runtime: move coop mod into runtime (#​5152)
  • runtime: move budget state to context thread-local (#​5157)
  • runtime: move park logic into runtime module (#​5158)
  • runtime: move Runtime into its own file (#​5159)
  • runtime: unify entering a runtime with Handle::enter (#​5163)
  • runtime: remove handle reference from each scheduler (#​5166)
  • runtime: move enter into context (#​5167)
  • runtime: combine context and entered thread-locals (#​5168)
  • runtime: fix accidental unsetting of current handle (#​5178)
  • runtime: move CoreStage methods to Core (#​5182)
  • sync: name mpsc semaphore types (#​5146)

v1.21.2: Tokio v1.21.2

Compare Source

1.21.2 (September 27, 2022)

This release removes the dependency on the once_cell crate to restore the MSRV of 1.21.x, which is the latest minor version at the time of release. (#​5048)

v1.21.1: Tokio v1.21.1

Compare Source

1.21.1 (September 13, 2022)

Fixed
  • net: fix dependency resolution for socket2 (#​5000)
  • task: ignore failure to set TLS in LocalSet Drop (#​4976)

v1.21.0: Tokio v1.21.0

Compare Source

1.21.0 (September 2, 2022)

This release is the first release of Tokio to intentionally support WASM. The sync,macros,io-util,rt,time features are stabilized on WASM. Additionally the wasm32-wasi target is given unstable support for the net feature.

Added
  • net: add device and bind_device methods to TCP/UDP sockets (#​4882)
  • net: add tos and set_tos methods to TCP and UDP sockets (#​4877)
  • net: add security flags to named pipe ServerOptions (#​4845)
  • signal: add more windows signal handlers (#​4924)
  • sync: add mpsc::Sender::max_capacity method (#​4904)
  • sync: implement Weak version of mpsc::Sender (#​4595)
  • task: add LocalSet::enter (#​4765)
  • task: stabilize JoinSet and AbortHandle (#​4920)
  • tokio: add track_caller to public APIs (#​4805, #​4848, #​4852)
  • wasm: initial support for wasm32-wasi target (#​4716)
Fixed
  • miri: improve miri compatibility by avoiding temporary references in linked_list::Link impls (#​4841)
  • signal: don't register write interest on signal pipe (#​4898)
  • sync: add #[must_use] to lock guards (#​4886)
  • sync: fix hang when calling recv on closed and reopened broadcast channel (#​4867)
  • task: propagate attributes on task-locals (#​4837)
Changed
  • fs: change panic to error in File::start_seek (#​4897)
  • io: reduce syscalls in poll_read (#​4840)
  • process: use blocking threadpool for child stdio I/O (#​4824)
  • signal: make SignalKind methods const (#​4956)
Internal changes
  • rt: extract basic_scheduler::Config (#​4935)
  • rt: move I/O driver into runtime module (#​4942)
  • rt: rename internal scheduler types (#​4945)
Documented
  • chore: fix typos and grammar (#​4858, #​4894, #​4928)
  • io: fix typo in AsyncSeekExt::rewind docs (#​4893)
  • net: add documentation to try_read() for zero-length buffers (#​4937)
  • runtime: remove incorrect panic section for Builder::worker_threads (#​4849)
  • sync: doc of watch::Sender::send improved (#​4959)
  • task: add cancel safety docs to JoinHandle (#​4901)
  • task: expand on cancellation of spawn_blocking (#​4811)
  • time: clarify that the first tick of Interval::tick happens immediately (#​4951)
Unstable
  • rt: add unstable option to disable the LIFO slot (#​4936)
  • task: fix incorrect signature in Builder::spawn_on (#​4953)
  • task: make task::Builder::spawn* methods fallible (#​4823)

v1.20.5: Tokio v1.20.5

Compare Source

1.20.5 (May 28, 2023)

Forward ports 1.18.6 changes.

Fixed
  • deps: disable default features for mio (#​5728)

v1.20.4

Compare Source

v1.20.3

Compare Source

v1.20.2: Tokio v1.20.2

Compare Source

1.20.2 (September 27, 2022)

This release removes the dependency on the once_cell crate to restore the MSRV of the 1.20.x LTS release. (#​5048)

v1.20.1: Tokio v1.20.1

Compare Source

1.20.1 (July 25, 2022)

Fixed
  • chore: fix version detection in build script (#​4860)

v1.20.0: Tokio v1.20.0

Compare Source

1.20.0 (July 12, 2022)

Added
Changed
  • time: remove src/time/driver/wheel/stack.rs (#​4766)
  • rt: clean up arguments passed to basic scheduler (#​4767)
  • net: be more specific about winapi features (#​4764)
  • tokio: use const initialized thread locals where possible (#​4677)
  • task: various small improvements to LocalKey (#​4795)
Fixed
Documented
  • fs: warn about performance pitfall (#​4762)
  • chore: fix spelling (#​4769)
  • sync: document spurious failures in oneshot (#​4777)
  • sync: add warning for watch in non-Send futures (#​4741)
  • chore: fix typo (#​4798)
Unstable
  • joinset: rename join_one to join_next (#​4755)
  • rt: unhandled panic config for current thread rt (#​4770)

v1.19.2: Tokio v1.19.2

Compare Source

1.19.2 (June 6, 2022)

This release fixes another bug in Notified::enable. (#​4751)

v1.19.1: Tokio v1.19.1

Compare Source

1.19.1 (June 5, 2022)

This release fixes a bug in Notified::enable. (#​4747)

v1.19.0: Tokio v1.19.0

Compare Source

1.19.0 (June 3, 2022)

Added
  • runtime: add is_finished method for JoinHandle and AbortHandle (#​4709)
  • runtime: make global queue and event polling intervals configurable (#​4671)
  • sync: add Notified::enable (#​4705)
  • sync: add watch::Sender::send_if_modified (#​4591)
  • sync: add resubscribe method to broadcast::Receiver (#​4607)
  • net: add take_error to TcpSocket and TcpStream (#​4739)
Changed
  • io: refactor out usage of Weak in the io handle (#​4656)
Fixed
  • macros: avoid starvation in join! and try_join! (#​4624)
Documented
  • runtime: clarify semantics of tasks outliving block_on (#​4729)
  • time: fix example for MissedTickBehavior::Burst (#​4713)
Unstable
  • metrics: correctly update atomics in IoDriverMetrics (#​4725)
  • metrics: fix compilation with unstable, process, and rt, but without net (#​4682)
  • task: add #[track_caller] to JoinSet/JoinMap (#​4697)
  • task: add Builder::{spawn_on, spawn_local_on, spawn_blocking_on} (#​4683)
  • task: add consume_budget for cooperative scheduling (#​4498)
  • task: add join_set::Builder for configuring JoinSet tasks (#​4687)
  • task: update return value of JoinSet::join_one (#​4726)

v1.18.6: Tokio v1.18.6

Compare Source

1.18.6 (May 28, 2023)

Fixed
  • deps: disable default features for mio (#​5728)

v1.18.5

Compare Source

v1.18.4

Compare Source

v1.18.3: Tokio v1.18.3

Compare Source

1.18.3 (September 27, 2022)

This release removes the dependency on the once_cell crate to restore the MSRV of the 1.18.x LTS release. (#​5048)

v1.18.2: Tokio v1.18.2

Compare Source

1.18.2 (May 5, 2022)

Add missing features for the winapi dependency. (#​4663)

v1.18.1: Tokio v1.18.1

Compare Source

1.18.1 (May 2, 2022)

The 1.18.0 release broke the build for targets without 64-bit atomics when building with tokio_unstable. This release fixes that. (#​4649)

v1.18.0: Tokio v1.18.0

Compare Source

1.18.0 (April 27, 2022)

This release adds a number of new APIs in tokio::net, tokio::signal, and tokio::sync. In addition, it adds new unstable APIs to tokio::task (Ids for uniquely identifying a task, and AbortHandle for remotely cancelling a task), as well as a number of bugfixes.

Fixed
  • blocking: add missing #[track_caller] for spawn_blocking (#​4616)
  • macros: fix select macro to process 64 branches (#​4519)
  • net: fix try_io methods not calling Mio's try_io internally (#​4582)
  • runtime: recover when OS fails to spawn a new thread (#​4485)
Added
  • net: add UdpSocket::peer_addr (#​4611)
  • net: add try_read_buf method for named pipes (#​4626)
  • signal: add SignalKind Hash/Eq impls and c_int conversion (#​4540)
  • signal: add support for signals up to SIGRTMAX (#​4555)
  • sync: add watch::Sender::send_modify method (#​4310)
  • sync: add broadcast::Receiver::len method (#​4542)
  • sync: add watch::Receiver::same_channel method (#​4581)
  • sync: implement Clone for RecvError types (#​4560)
Changed
  • update mio to 0.8.1 (#​4582)
  • macros: rename tokio::select!'s internal util module (#​4543)
  • runtime: use Vec::with_capacity when building runtime (#​4553)
Documented
  • improve docs for tokio_unstable (#​4524)
  • runtime: include more documentation for thread_pool/worker (#​4511)
  • runtime: update Handle::current's docs to mention EnterGuard (#​4567)
  • time: clarify platform specific timer resolution (#​4474)
  • signal: document that Signal::recv is cancel-safe (#​4634)
  • sync: UnboundedReceiver close docs (#​4548)
Unstable

The following changes only apply when building with --cfg tokio_unstable:

  • task: add task::Id type (#​4630)
  • task: add AbortHandle type for cancelling tasks in a JoinSet (#​4530], [#​4640)
  • task: fix missing doc(cfg(...)) attributes for JoinSet (#​4531)
  • task: fix broken link in AbortHandle RustDoc (#​4545)
  • metrics: add initial IO driver metrics (#​4507)

v1.17.0: Tokio v1.17.0

Compare Source

1.17.0 (February 15, 2022)

This release updates the minimum supported Rust version (MSRV) to 1.49, the mio dependency to v0.8, and the (optional) parking_lot dependency to v0.12. Additionally, it contains several bug fixes, as well as internal refactoring and performance improvements.

Fixed
  • time: prevent panicking in sleep with large durations (#​4495)
  • time: eliminate potential panics in Instant arithmetic on platforms where Instant::now is not monotonic (#​4461)
  • io: fix DuplexStream not participating in cooperative yielding (#​4478)
  • rt: fix potential double panic when dropping a JoinHandle (#​4430)
Changed
  • update minimum supported Rust version to 1.49 (#​4457)
  • update parking_lot dependency to v0.12.0 (#​4459)
  • update mio dependency to v0.8 (#​4449)
  • rt: remove an unnecessary lock in the blocking pool (#​4436)
  • rt: remove an unnecessary enum in the basic scheduler (#​4462)
  • time: use bit manipulation instead of modulo to improve performance (#​4480)
  • net: use std::future::Ready instead of our own Ready future (#​4271)
  • replace deprecated atomic::spin_loop_hint with hint::spin_loop (#​4491)
  • fix miri failures in intrusive linked lists (#​4397)
Documented
  • io: add an example for tokio::process::ChildStdin (#​4479)
Unstable

The following changes only apply when building with --cfg tokio_unstable:

  • task: fix missing location information in tracing spans generated by spawn_local (#​4483)
  • task: add JoinSet for managing sets of tasks (#​4335)
  • metrics: fix compilation error on MIPS (#​4475)
  • metrics: fix compilation error on arm32v7 (#​4453)

v1.16.1: Tokio v1.16.1

Compare Source

1.16.1 (January 28, 2022)

This release fixes a bug in #​4428 with the change #​4437.

v1.16.0: Tokio v1.16.0

Compare Source

Fixes a soundness bug in io::Take (#​4428). The unsoundness is exposed when leaking memory in the given AsyncRead implementation and then overwriting the supplied buffer:

impl AsyncRead for Buggy {
    fn poll_read(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut ReadBuf<'_>
    ) -> Poll<Result<()>> {
      let new_buf = vec![0; 5].leak();
      *buf = ReadBuf::new(new_buf);
      buf.put_slice(b"hello");
      Poll::Ready(Ok(()))
    }
}

Also, this release includes improvements to the multi-threaded scheduler that can increase throughput by up to 20% in some cases (#​4383).

Fixed
  • io: soundness don't expose uninitialized memory when using io::Take in edge case (#​4428)
  • fs: ensure File::write results in a write syscall when the runtime shuts down (#​4316)
  • process: drop pipe after child exits in wait_with_output (#​4315)
  • rt: improve error message when spawning a thread fails (#​4398)
  • rt: reduce false-positive thread wakups in the multi-threaded scheduler (#​4383)
  • sync: don't inherit Send from parking_lot::*Guard (#​4359)
Added
  • net: TcpSocket::linger() and set_linger() (#​4324)
  • net: impl UnwindSafe for socket types (#​4384)
  • rt: impl UnwindSafe for JoinHandle (#​4418)
  • sync: watch::Receiver::has_changed() (#​4342)
  • sync: oneshot::Receiver::blocking_recv() (#​4334)
  • sync: RwLock blocking operations (#​4425)
Unstable

The following changes only apply when building with --cfg tokio_unstable

  • rt: breaking change overhaul runtime metrics API (#​4373)

v1.15.0: Tokio v1.15.0

Compare Source

Fixed
  • io: add cooperative yielding support to io::empty() (#​4300)
  • time: make timeout robust against budget-depleting tasks (#​4314)
Changed
  • update minimum supported Rust version to 1.46.
Added
  • time: add Interval::reset() (#​4248)
  • io: add explicit lifetimes to AsyncFdReadyGuard (#​4267)
  • process: add Command::as_std() (#​4295)
Added (unstable)
  • tracing: instrument tokio::sync types (#​4302)

v1.14.1: Tokio v1.14.1

Compare Source

This release backports a bug fix from 1.16.1

Fixes a soundness bug in io::Take (#​4428). The unsoundness is exposed when leaking memory in the given AsyncRead implementation and then overwriting the supplied buffer:

impl AsyncRead for Buggy {
    fn poll_read(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut ReadBuf<'_>
    ) -> Poll<Result<()>> {
      let new_buf = vec![0; 5].leak();
      *buf = ReadBuf::new(new_buf);
      buf.put_slice(b"hello");
      Poll::Ready(Ok(()))
    }
}
Fixed
  • io: soundness don't expose uninitialized memory when using io::Take in edge case (#​4428)

v1.14.0: Tokio v1.14.0

Compare Source

1.14.0 (November 15, 2021)

Fixed
  • macros: fix compiler errors when using mut patterns in select! (#​4211)
  • sync: fix a data race between oneshot::Sender::send and awaiting a oneshot::Receiver when the oneshot has been closed (#​4226)
  • sync: make AtomicWaker panic safe (#​3689)
  • runtime: fix basic scheduler dropping tasks outside a runtime context (#​4213)
Added
Changed
  • io: updated copy buffer size to match std::io::copy (#​4209)
Documented
  • io: rename buffer to file in doc-test (#​4230)
  • sync: fix Notify example (#​4212)

v1.13.1: Tokio v1.13.1

Compare Source

1.13.1 (November 15, 2021)

This release fixes a data race when sending and receiving on a closed oneshot channel (RUSTSEC-2021-0124).

Fixed
  • sync: fix a data race between oneshot::Sender::send and awaiting a oneshot::Receiver when the oneshot has been closed (#​4226)

v1.13.0: Tokio v1.13.0

Compare Source

1.13.0 (October 29, 2021)

Fixed
  • sync: fix Notify to clone the waker before locking its waiter list (#​4129)
  • tokio: add riscv32 to non atomic64 architectures (#​4185)
Added
  • net: add poll_{recv,send}_ready methods to udp and uds_datagram (#​4131)
  • net: add try_*, readable, writable, ready, and peer_addr methods to split halves (#​4120)
  • sync: add blocking_lock to Mutex (#​4130)
  • sync: add watch::Sender::send_replace (#​3962, #​4195)
  • sync: expand Debug for Mutex<T> impl to unsized T (#​4134)
  • tracing: instrument time::Sleep (#​4072)
  • tracing: use structured location fields for spawned tasks (#​4128)
Changed
  • io: add assert in copy_bidirectional that poll_write is sensible (#​4125)
  • macros: use qualified syntax when polling in select! (#​4192)
  • runtime: handle block_on wakeups better (#​4157)
  • task: allocate callback on heap immediately in debug mode (#​4203)
  • tokio: assert platform-minimum requirements at build time (#​3797)
Documented
  • docs: conversion of doc comments to indicative mood (#​4174)
  • docs: add returning on the first error example for try_join! (#​4133)
  • docs: fixing broken links in tokio/src/lib.rs (#​4132)
  • signal: add example with background listener (#​4171)
  • sync: add more oneshot examples (#​4153)
  • time: document Interval::tick cancel safety (#​4152)

v1.12.0: Tokio v1.12.0

Compare Source

1.12.0 (September 21, 2021)

Fixed
  • mpsc: ensure try_reserve error is consistent with try_send (#​4119)
  • mpsc: use spin_loop_hint instead of yield_now (#​4115)
  • sync: make SendError field public (#​4097)
Added
  • io: add POSIX AIO on FreeBSD (#​4054)
  • io: add convenience method AsyncSeekExt::rewind (#​4107)
  • runtime: add tracing span for block_on futures (#​4094)
  • runtime: callback when a worker parks and unparks (#​4070)
  • sync: implement try_recv for mpsc channels (#​4113)
Changed
  • macros: run runtime inside LocalSet when using macro (#​4027)
Documented
  • docs: clarify CPU-bound tasks on Tokio (#​4105)
  • mpsc: document spurious failures on poll_recv (#​4117)
  • mpsc: document that PollSender impls Sink (#​4110)
  • task: document non-guarantees of yield_now (#​4091)
  • time: document paused time details better (#​4061, #​4103)

v1.11.0: Tokio v1.11.0

Compare Source

1.11.0 (August 31, 2021)

Fixed
  • time: don't panic when Instant is not monotonic (#​4044)
  • io: fix panic in fill_buf by not calling poll_fill_buf twice (#​4084)
Added
  • watch: add watch::Sender::subscribe (#​3800)
  • process: add from_std to ChildStd* (#​4045)
  • stats: initial work on runtime stats (#​4043)
Changed
Documented
  • time: make Sleep examples easier to find (#​4040)

v1.10.1: Tokio v1.10.1

Compare Source

1.10.1 (August 24, 2021)

Fixed
  • runtime: fix leak in UnownedTask (#​4063)

v1.10.0: Tokio v1.10.0

Compare Source

1.10.0 (August 12, 2021)

Added
  • io: add (read|write)_f(32|64)[_le] methods (#​4022)
  • io: add fill_buf and consume to AsyncBufReadExt (#​3991)
  • process: add Child::raw_handle() on windows (#​3998)
Fixed
  • doc: fix non-doc builds with --cfg docsrs (#​4020)
  • io: flush eagerly in io::copy (#​4001)
  • runtime: a debug assert was sometimes triggered during shutdown (#​4005)
  • sync: use spin_loop_hint instead of yield_now in mpsc (#​4037)
  • tokio: the test-util feature depends on rt, sync, and time (#​4036)
Changes
  • runtime: reorganize parts of the runtime (#​3979, #​4005)
  • signal: make windows docs for signal module show up on unix builds (#​3770)
  • task: quickly send task to heap on debug mode (#​4009)
Documented
  • io: document cancellation safety of AsyncBufReadExt (#​3997)
  • sync: document when watch::send fails (#​4021)

v1.9.0: Tokio v1.9.0

Compare Source

1.9.0 (July 19, 2021)

Added
  • net: allow customized I/O operations for TcpStream (#​3888)
  • sync: add getter for the mutex from a guard (#​3928)
  • task: expose nameable future for TaskLocal::scope (#​3273)
Fixed
  • Fix leak if output of future panics on drop (#​3967)
  • Fix leak in LocalSet (#​3978)
Changes

v1.8.5: Tokio v1.8.5

Compare Source

This release backports a bug fix from 1.16.1

Fixes a soundness bug in io::Take (#​4428). The unsoundness is exposed when leaking memory in the given AsyncRead implementation and then overwriting the supplied buffer:

impl AsyncRead for Buggy {
    fn poll_read(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        buf: &mut ReadBuf<'_>
    ) -> Poll<Result<()>> {
      let new_buf = vec![0; 5].leak();
      *buf = ReadBuf::new(new_buf);
      buf.put_slice(b"hello");
      Poll::Ready(Ok(()))
    }
}
Fixed
  • io: soundness don't expose uninitialized memory when using io::Take in edge case (#​4428)

v1.8.4: Tokio v1.8.4

Compare Source

1.8.4 (November 15, 2021)

This release backports a bugfix for a data race when sending and receiving on a closed oneshot channel ([RUSTSEC-2021-0124]) from v1.13.1.

Fixed
  • sync: fix a data race between oneshot::Sender::send and awaiting a oneshot::Receiver when the oneshot has been closed (#​4226)

v1.8.3: Tokio v1.8.3

Compare Source

1.8.3 (July 22, 2021)

This release backports two fixes from 1.9.0

Fixed
  • Fix leak if output of future panics on drop (#​3967)
  • Fix leak in LocalSet (#​3978)

v1.8.2: Tokio 1.8.2

Compare Source

Fixes a missed edge case from 1.8.1.

Fixed
  • runtime: drop canceled future on next poll (#​3965)

v1.8.1: Tokio 1.8.1

Compare Source

Forward ports 1.5.1 fixes.

Fixed
  • runtime: remotely abort tasks on JoinHandle::abort (#​3934)

v1.8.0

Compare Source

1.8.0 (July 2, 2021)

Added
  • io: add get_{ref,mut} methods to AsyncFdReadyGuard and AsyncFdReadyMutGuard (#​3807)
  • io: efficient implementation of vectored writes for BufWriter (#​3163)
  • net: add ready/try methods to NamedPipe{Client,Server} (#​3866, #​3899)
  • sync: add watch::Receiver::borrow_and_update (#​3813)
  • sync: implement From<T> for OnceCell<T> (#​3877)
  • time: allow users to specify Interval behaviour when delayed (#​3721)
Added (unstable)
  • rt: add tokio::task::Builder (#​3881)
Fixed
  • net: handle HUP event with UnixStream (#​3898)
Documented
  • doc: document cancellation safety (#​3900)
  • time: add wait alias to sleep (#​3897)
  • time: document auto-advancing behaviour of runtime (#​3763)

v1.7.3: Tokio 1.7.3

Compare Source

Fixes a missed edge case from 1.7.2.

Fixed
  • runtime: drop canceled future on next poll (#​3965)

v1.7.2: Tokio v1.7.2

Compare Source

Forward ports 1.5.1 fixes.

Fixed
  • runtime: remotely abort tasks on JoinHandle::abort (#​3934)

v1.7.1: Tokio v1.7.1

Compare Source

Fixed
  • runtime: fix early task shutdown during runtime shutdown (#​3870)

v1.7.0: Tokio v1.7.0

Compare Source

1.7.0 (June 15, 2021)

Added
  • net: add named pipes on windows (#​3760)
  • net: add TcpSocket from std::net::TcpStream conversion (#​3838)
  • sync: add receiver_count to watch::Sender (#​3729)
  • sync: export sync::notify::Notified future publicly (#​3840)
  • tracing: instrument task wakers (#​3836)
Fixed
  • macros: suppress clippy::default_numeric_fallback lint in generated code (#​3831)
  • runtime: immediately drop new tasks when runtime is shut down (#​3752)
  • sync: deprecate unused mpsc::RecvError type (#​3833)
Documented
  • io: clarify EOF condition for AsyncReadExt::read_buf (#​3850)
  • io: clarify limits on return values of AsyncWrite::poll_write (#​3820)
  • sync: add examples to Semaphore (#​3808)

v1.6.4: Tokio 1.6.4

Compare Source

Fixes a missed edge case from 1.6.3.

Fixed
  • runtime: drop canceled future on next poll (#​3965)

v1.6.3: Tokio v1.6.3

Compare Source

Forward ports 1.5.1 fixes.

Fixed
  • runtime: remotely abort tasks on JoinHandle::abort (#​3934)

v1.6.2: Tokio v1.6.2

Compare Source

Fixes
  • test: sub-ms time:advance regression introduced in 1.6 (#​3852)

v1.6.1: Tokio v1.6.1

Compare Source

This release reverts #​3518 because it doesn't work on some kernels due to a kernel bug. (#​3803)

v1.6.0: Tokio v1.6.0

Compare Source

1.6.0 (May 14, 2021)

Added
  • fs: try doing a non-blocking read before punting to the threadpool (#​3518)
  • io: add write_all_buf to AsyncWriteExt (#​3737)
  • io: implement AsyncSeek for BufReader, BufWriter, and BufStream (#​3491)
  • net: support non-blocking vectored I/O (#​3761)
  • sync: add mpsc::Sender::{reserve_owned, try_reserve_owned} (#​3704)
  • sync: add a MutexGuard::map method that returns a MappedMutexGuard (#​2472)
  • time: add getter for Interval's period (#​3705)
Fixed
  • io: wake pending writers on DuplexStream close (#​3756)
  • process: avoid redundant effort to reap orphan processes (#​3743)
  • signal: use std::os::raw::c_int instead of libc::c_int on public API (#​3774)
  • sync: preserve permit state in notify_waiters (#​3660)
  • task: update JoinHandle panic message (#​3727)
  • time: prevent time::advance from going too far (#​3712)
Documented
  • net: hide net::unix::datagram module from docs (#​3775)
  • process: updated example (#​3748)
  • sync: Barrier doc should use task, not thread (#​3780)
  • task: update documentation on block_in_place (#​3753)

v1.5.1: Tokio v1.5.1

Compare Source

Fixed
  • runtime: remotely abort tasks on JoinHandle::abort (#​3934)

v1.5.0: Tokio v1.5.0

Compare Source

1.5.0 (April 12, 2021)

Added
  • io: add AsyncSeekExt::stream_position (#​3650)
  • io: add AsyncWriteExt::write_vectored (#​3678)
  • io: add a copy_bidirectional utility (#​3572)
  • net: implement IntoRawFd for TcpSocket (#​3684)
  • sync: add OnceCell (#​3591)
  • sync: add OwnedRwLockReadGuard and OwnedRwLockWriteGuard (#​3340)
  • sync: add Semaphore::is_closed (#​3673)
  • sync: add mpsc::Sender::capacity (#​3690)
  • sync: allow configuring RwLock max reads (#​3644)
  • task: add sync_scope for LocalKey (#​3612)
Fixed
  • chore: try to avoid noalias attributes on intrusive linked list (#​3654)
  • rt: fix panic in JoinHandle::abort() when called from other threads (#​3672)
  • sync: don't panic in oneshot::try_recv (#​3674)
  • sync: fix notifications getting dropped on receiver drop (#​3652)
  • sync: fix Semaphore permit overflow calculation (#​3644)
Documented
  • io: clarify requirements of AsyncFd (#​3635)
  • runtime: fix unclear docs for {Handle,Runtime}::block_on (#​3628)
  • sync: document that Semaphore is fair (#​3693)
  • sync: improve doc on blocking mutex (#​3645)

v1.4.0: Tokio v1.4.0

Compare Source

Added
  • macros: introduce biased argument for select! (#​3603)
  • runtime: add Handle::block_on (#​3569)
Fixed
  • runtime: avoid unnecessary polling of block_on future (#​3582)
  • runtime: fix memory leak/growth when creating many runtimes (#​3564)
  • runtime: mark EnterGuard with must_use (#​3609)
Documented
  • chore: mention fix for building docs in contributing guide (#​3618)
  • doc: add link to PollSender (#​3613)
  • doc: alias sleep to delay (#​3604)
  • sync: improve Mutex FIFO explanation (#​3615)
  • timer: fix double newline in module docs (#​3617)

v1.3.0: Tokio v1.3.0

Compare Source

Added
  • coop: expose an unconstrained() opt-out (#​3547)
  • net: add into_std for net types without it (#​3509)
  • sync: add same_channel method to mpsc::Sender (#​3532)
  • sync: add {try_,}acquire_many_owned to Semaphore (#​3535)
  • sync: add back RwLockWriteGuard::map and RwLockWriteGuard::try_map (#​3348)
Fixed
  • sync: allow oneshot::Receiver::close after successful try_recv (#​3552)
  • time: do not panic on timeout(Duration::MAX) (#​3551)
Documented
  • doc: doc aliases for pre-1.0 function names (#​3523)
  • io: fix typos (#​3541)
  • io: note the EOF behaviour of read_until (#​3536)
  • io: update AsyncRead::poll_read doc (#​3557)
  • net: update UdpSocket splitting doc (#​3517)
  • runtime: add link to LocalSet on new_current_thread (#​3508)
  • runtime: update documentation of thread limits (#​3527)
  • sync: do not recommend join_all for Barrier (#​3514)
  • sync: documentation for oneshot (#​3592)
  • sync: rename notify to notify_one (#​3526)
  • time: fix typo in Sleep doc (#​3515)
  • time: sync interval.rs and time/mod.rs docs (#​3533)

v1.2.0: Tokio v1.2.0

Compare Source

Added
  • signal: make Signal::poll_recv method public (#​3383)
Fixed
  • time: make test-util paused time fully deterministic (#​3492)
Documented
  • sync: link to new broadcast and watch wrappers (#​3504)

v1.1.1: Tokio v1.1.1

Compare Source

Forward ports 1.0.3 fix.

Fixed
  • io: memory leak during shutdown (#​3477).

v1.1.0: Tokio v1.1.0

Compare Source

Added
  • net: add try_read_buf and try_recv_buf (#​3351)
  • mpsc: Add Sender::try_reserve function (#​3418)
  • sync: add RwLock try_read and try_write methods (#​3400)
  • io: add ReadBuf::inner_mut (#​3443)
Changed
  • macros: improve select! error message (#​3352)
  • io: keep track of initialized bytes in read_to_end (#​3426)
  • runtime: consolidate errors for context missing (#​3441)
Fixed
  • task: wake LocalSet on spawn_local (#​3369)
  • sync: fix panic in broadcast::Receiver drop (#​3434)
Documented
  • stream: link to new Stream wrappers in tokio-stream (#​3343)
  • docs: mention that test-util feature is not enabled with full (#​3397)
  • process: add documentation to process::Child fields (#​3437)
  • io: clarify AsyncFd docs about changes of the inner fd (#​3430)
  • net: update datagram docs on splitting (#​3448)
  • time: document that Sleep is not Unpin (#​3457)
  • sync: add link to PollSemaphore (#​3456)
  • task: add LocalSet example (#​3438)
  • sync: improve bounded mpsc documentation (#​3458)

v1.0.3: Tokio v1.0.3

Compare Source

Fixed
  • io: memory leak during shutdown (#​3477).

v1.0.2: Tokio v1.0.2

Compare Source

Fixed
  • io: soundness in read_to_end (#​3428).

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Merge request reports