Tokio Versions Save

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

tokio-1.28.0

1 year ago

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)

tokio-1.27.0

1 year ago

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)

tokio-1.26.0

1 year ago

Fixed

Added

Changed

Internal Changes

Unstable

Documented

tokio-1.25.0

1 year ago

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)

tokio-1.24.1

1 year ago

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

tokio-1.24.0

1 year ago

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)

tokio-1.23.1

1 year ago

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).

tokio-1.23.0

1 year ago

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)

tokio-1.22.0

1 year ago

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)

tokio-1.21.2

1 year ago

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)