1.54.0
Added 9
- Add File::set_times, File::set_modified, and fs::FileTimes
- Implement Default for named_pipe::{ClientOptions, ServerOptions}
- Add Builder::max_io_events_per_busy_tick to the runtime builder
- Stabilize tokio::runtime::worker_index()
- Add SemaphorePermit::semaphore()
- Add blocking_acquire methods to Semaphore
- Add watch::Receiver::is_closed
- Support JSPI for the Emscripten target
- Support the wasm32-unknown-emscripten target
Changed 21
- The MSRV is increased to 1.85 requirement raised · inferred, marked in the notes below
- Reject zero in File::set_max_buf_size behavior changed · inferred, marked in the notes below
- Make copy_buf cooperative
- Panic when BufReader or BufStream is created with zero capacity behavior changed · inferred, marked in the notes below
- Panic when in-memory pipe is created with zero capacity behavior changed · inferred, marked in the notes below
- Reject zero buffer size in copy_bidirectional_with_sizes behavior changed · inferred, marked in the notes below
- Support vectored writes in Sink
- Start UnixStream::pair and UnixDatagram::pair sockets as writable
- Start accepted sockets as readable and writable
- Support UCred on Fuchsia
- Use mio::unix::pipe for Unix child stdio
- Cache-pad the shared injection queue and idle state
- Decide auto-boxing of spawned futures at monomorphization time
- Make enable_io available whenever rt is enabled
- Move block_in_place setup into a non-generic function
- Move the multi-thread inject queue to its own mutex
- Panic when max_io_events_per_tick is zero behavior changed · inferred, marked in the notes below
- Suggest .await in nested block_on panic message
- Avoid atomic reader count in broadcast slots
- Use acquire/release orderings in Notify
- Remove the runtime handle from timers
Fixed 21
- Restore File internal state when an operation fails
- Complete zero-length memory stream operations immediately
- Flush the writer when the reader stalls in copy_buf
- Keep the shutdown bit when clearing readiness
- Preserve the full ScheduledIo tick in readiness events
- Read lines as bytes so a partial line survives an I/O error
- Retry on ErrorKind::Interrupted in more I/O operations
- Use spawn_mandatory_blocking for stdout and stderr
- Wait for pending operations before BufReader seeks
- Close CreateFileW handle on SetNamedPipeHandleState failure
- Fix peer credentials on NetBSD
- Saturate TcpSocket and UnixSocket listen backlog
- Treat ENOTCONN as success in UnixStream::shutdown
- Allow building with --all-features without tokio_unstable
- Avoid overflow in shutdown_timeout()
- Fix spawn_blocking hang when only scheduler workers exist
- Fix misleading signal driver panic message
- Preserve FIFO lock order when coop budget is exhausted
- Use usize for permit count in SemaphorePermit
- Avoid interval deadline overflow
- Handle wrapped top-level timer-wheel slots
6 changes to check, marked in the notes below
From Tokio
The 1.54.0 release includes all changes up to 1.53.3.
The MSRV is increased to 1.85. (#8514) requirement raised · inferred
Added
- fs: add
File::set_times,File::set_modified, andfs::FileTimes(#8504) - net: implement
Defaultfornamed_pipe::{ClientOptions, ServerOptions}(#8378) - runtime: add
Builder::max_io_events_per_busy_tick(#8410) - runtime: stabilize
tokio::runtime::worker_index()(#8431) - sync: add
SemaphorePermit::semaphore()(#8482) - sync: add
blocking_acquiremethods toSemaphore(#8269) - sync: add
watch::Receiver::is_closed(#8481) - wasm: support JSPI for Emscripten target (#8285, #8627)
- wasm: support the
wasm32-unknown-emscriptentarget (#8281, #8422, #8528, #8628)
Changed
- fs: reject zero in
File::set_max_buf_size(#8449) behavior changed · inferred - io: make
copy_bufcooperative (#8459) - io: panic when
BufReaderorBufStreamis created with zero capacity (#8494) behavior changed · inferred - io: panic when in-memory pipe is created with zero capacity (#8397) behavior changed · inferred
- io: reject zero buffer size in
copy_bidirectional_with_sizes(#8454) behavior changed · inferred - io: support vectored writes in
Sink(#8663) - net: start
UnixStream::pairandUnixDatagram::pairsockets as writable (#8444) - net: start accepted sockets as readable and writable (#8435)
- net: support
UCredon Fuchsia (#8257) - process: use
mio::unix::pipefor Unix child stdio (#8603) - runtime: cache-pad the shared injection queue and idle state (#8622)
- runtime: decide auto-boxing of spawned futures at monomorphization time (#8414)
- runtime: make
enable_ioavailable wheneverrtis enabled (#8387) - runtime: move
block_in_placesetup into a non-generic function (#8315) - runtime: move the multi-thread inject queue to its own mutex (#8382)
- runtime: panic when
max_io_events_per_tickis zero (#8476) behavior changed · inferred - runtime: suggest
.awaitin nestedblock_onpanic message (#8501) - sync: avoid atomic reader count in broadcast slots (#8357)
- sync: use acquire/release orderings in
Notify(#8325) - time: remove the runtime handle from timers (#8458)
Fixed
- fs: restore
Fileinternal state when op fails (#8291) - io: complete zero-length memory stream operations immediately (#8323)
- io: flush the writer when the reader stalls in
copy_buf(#8424) - io: keep the shutdown bit when clearing readiness (#8435)
- io: preserve the full
ScheduledIotick in readiness events (#8331) - io: read lines as bytes so a partial line survives an I/O error (#8400)
- io: retry on
ErrorKind::Interruptedin more I/O operations (#8417, #8432, #8448, #8453, #8455, #8460) - io: use
spawn_mandatory_blockingfor stdout and stderr (#8506) - io: wait for pending operations before
BufReaderseeks (#8599) - net: close
CreateFileWhandle onSetNamedPipeHandleStatefailure (#8418) - net: fix peer credentials on NetBSD (#8589)
- net: saturate
TcpSocketandUnixSocketlisten backlog (#8511) - net: treat
ENOTCONNas success inUnixStream::shutdown(#8526) - runtime: allow building with
--all-featureswithouttokio_unstable(#8401) - runtime: avoid overflow in
shutdown_timeout()(#8497) - runtime: fix
spawn_blockinghang when only scheduler workers exist (#8408) - runtime: fix misleading signal driver panic message (#8419)
- sync: preserve FIFO lock order when coop budget is exhausted (#8371)
- sync: use
usizefor permit count inSemaphorePermit(#8405) - time: avoid interval deadline overflow (#8385)
- time: handle wrapped top-level timer-wheel slots (#8334)
Unstable
- fs: fall back when
io_uringhas no IO driver (#8165) - metrics: cap log histogram precision (#8496)
- runtime: add an opt-in sharded
spawn_blockingqueue (#8337) - runtime: expose schedule latency in task hooks (#8282)
- taskdump: fix idle bookkeeping when a task dump wakes parked workers (#8372)
- taskdump: skip non-idle tasks during taskdumps (#8568)
Documented
- docs: fix stray braces and broken links in rustdoc (#8605)
- fs: document cancellation behavior of
tokio::fs(#8265) - net: add Safety docs for named pipe
from_raw_handle(#8378) - net: document that
TcpStream::connectreturns only the last error (#8421) - runtime: add error documentation for
runtime::Builder(#8297) - runtime: link
available_parallelismin worker count docs (#8625) - sync: clarify panic behavior of
broadcast::channel()(#8420) - sync: fix typo in
Semaphoredocumentation (#8521)