Releases: tokio-rs/tokio
Tokio v1.21.0
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
andbind_device
methods to TCP/UDP sockets (#4882) - net: add
tos
andset_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
andAbortHandle
(#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
Tokio v1.20.1
Tokio v1.20.0
1.20.0 (July 12, 2022)
Added
- tokio: add track_caller to public APIs (#4772, #4791, #4793, #4806, #4808)
- sync: Add
has_changed
method towatch::Ref
(#4758)
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
Tokio v1.19.2
1.19.2 (June 6, 2022)
This release fixes another bug in Notified::enable
. (#4751)
Tokio v1.19.1
1.19.1 (June 5, 2022)
This release fixes a bug in Notified::enable
. (#4747)
Tokio v1.19.0
1.19.0 (June 3, 2022)
Added
- runtime: add
is_finished
method forJoinHandle
andAbortHandle
(#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
toTcpSocket
andTcpStream
(#4739)
Changed
- io: refactor out usage of Weak in the io handle (#4656)
Fixed
- macros: avoid starvation in
join!
andtry_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]
toJoinSet
/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 configuringJoinSet
tasks (#4687) - task: update return value of
JoinSet::join_one
(#4726)
Tokio v1.18.2
1.18.2 (May 5, 2022)
Add missing features for the winapi
dependency. (#4663)
Tokio v1.18.1
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)
Tokio v1.18.0
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
(Id
s
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]
forspawn_blocking
(#4616) - macros: fix
select
macro to process 64 branches (#4519) - net: fix
try_io
methods not calling Mio'stry_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 andc_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
forRecvError
types (#4560)
Changed
- update
mio
to 0.8.1 (#4582) - macros: rename
tokio::select!
's internalutil
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 mentionEnterGuard
(#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
:
Tokio v1.17.0
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
whereInstant::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 ownReady
future
(#4271) - replace deprecated
atomic::spin_loop_hint
withhint::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
: