Commit Graph
29 Commits
Author SHA1 Message Date
Russell CohenandGitHub 0121120b6d taskdump: skip double wake on Trace::capture/Trace::trace_with (#8043) 2026-05-12 19:56:50 +02:00
HueCodesandGitHub e77885a494 net: implement UCred::pid on FreeBSD (#8086) 2026-05-03 10:28:31 +02:00
Eliza WeismanandGitHub 56aaa43e91 rt: revert #7757 to fix regression in spawn_blocking (#8057)
This reverts commit 1604bc3351.

Unfortunately, this commit introduced a regression that causes programs
using `spawn_blocking` to hang (see #8056). To fix the regression, we
need to undo this change and publish a v1.52.1 release as soon as
possible.

In the future, we may wish to bring back a sharded queue for
`spawn_blocking` tasks, either based on the implementation added in
#7757 or a new one. However, since this is a substantial change to the
runtime internals, I think such a change should probably be done as an
unstable, opt-in `tokio::runtime::Builder` setting initially, so that we
don't regress existing users. I had hoped we could do this now, but
unfortunately, the sharded queue implementation from #7757 is kind of
tightly coupled with the rest of the `spawn_blocking` machinery and
cannot be easily swapped out --- and the hang still occurs with
`NUM_SHARDS` set to 1, so there isn't an easy way to turn it on and off.
Therefore, in the interest of getting a fix out ASAP, this is just a
simple revert.

Fixes #8056
2026-04-16 20:57:22 +00:00
Carter GreenandGitHub f943312865 fs: support io-uring in AsyncRead for File (#7907) 2026-04-13 20:36:23 +02:00
Alice RyhlandGitHub 81370e6202 net: add docs on ConnectionRefused errors with udp sockets (#7870) 2026-04-11 20:06:08 +00:00
Alex GaynorandGitHub 1604bc3351 rt: improve spawn_blocking scalability with sharded queue (#7757) 2026-04-10 16:06:19 +02:00
Joel DiceandGitHub 43134f1e57 wasm: add wasm32-wasip2 networking support (#7933)
Motivation

This adds networking support for the `wasm32-wasip2` target platform, which
includes more extensive support for sockets than `wasm32-wasip1`.

Solution

The bulk of the changes are in https://github.com/tokio-rs/mio/pull/1931.  This
patch mainly tweaks a few `cfg` directives to indicate `wasm32-wasip2`'s
additional capabilities.

Note that this is a draft PR until until
https://github.com/tokio-rs/mio/pull/1931 and
https://github.com/rust-lang/socket2/pull/639 have been include in stable
releases of their respective projects.

Also note that I've added a `wasm32-wasip2` target to CI and triaged each test
which was previously disabled for WASI into one of three categories:

- Disabled on both WASIp1 and p2 due to not-yet-supported features such as multithreading
- Disabled on p1 but enabled on p2
- Disabled on p1 and _temporarily_ disabled on p2 due to `wasi-libc` bugfixes which have been merged but not yet included in a Rust release.  I'll open an issue to re-enable them when the fixes land in Rust.

Future Work

In the future, we could consider adding support for `tokio::net::lookup_host`.
WASIp2 natively supports asynchronous DNS lookups and is single threaded,
whereas Tokio currently assumes DNS lookups are blocking and require
multithreading to emulate async lookups.  A WASIp2-specific implementation could
do the lookup directly without multithreading.

WASIp2 also supports single-threaded, asynchronous file I/O, timers, etc.  We
could either support those directly or wait for WASIp3's multithreading support,
in which case most of `tokio::fs` (as well as `tokio::net::lookup_host`, etc.)
_should_ work unchanged via `wasi-libc` and worker threads.

Currently, building for WASIp2 requires RUSTFLAGS="--cfg tokio_unstable"`.  Once
we have a solid maintenance plan, we can remove that requirement.
2026-04-02 11:53:17 +02:00
Jess IzenandGitHub a8435c0fc8 examples: add FD table pre-warming example (#7978) 2026-03-26 08:17:27 -07:00
TahmidandGitHub fdb150901a fs: check for io-uring opcode support (#7815) 2026-01-03 13:39:07 +01:00
QiandGitHub 73d733a341 time: add alternative timer for better multicore scalability (#7467)
This change introduces per-worker timer wheels in the time subsystem
to reduce the lock contention.

Key changes:
- Each worker now maintains a local timer wheel.
- Timer insertions are performed locally.
- Timer cancellations are forwarded via a
  dedicated cross-worker cancellation queue.

Relevant RFC: https://github.com/tokio-rs/tokio/issues/7384

---------

Signed-off-by: ADD-SP <[email protected]>
2025-11-27 09:29:28 +08:00
QiandGitHub b157f5da76 runtime: add guide for choosing between runtime types (#7635)
Signed-off-by: ADD-SP <[email protected]>
2025-10-01 22:00:46 +08:00
Martin GrigorovandGitHub 6dc4f85f0b net: clarify the behavior of UCred::pid() on Cygwin (#7611) 2025-09-15 00:05:05 +08:00
QiandGitHub 9ed6f70b81 ci: remove a typo from spellcheck.dic (#7524)
Signed-off-by: ADD-SP <[email protected]>
2025-08-10 20:31:09 +08:00
Luca BrunoandGitHub 1b27e17ff8 net: add SocketAddr::as_abstract_name (#7491) 2025-07-29 11:07:58 +02:00
Motoyuki KimuraandGitHub 327bec2caf rt: add infrastructure code for io_uring (#7320) 2025-05-21 02:36:52 +09:00
Paul MabileauandGitHub 7a6c424f6e process: add Command::spawn_with (#7249)
Signed-off-by: Paul Mabileau <[email protected]>
2025-04-16 14:07:36 +02:00
M.Amin RayejandGitHub 605ef578df coop: expose coop as a public module (#7116) 2025-02-14 18:56:12 +03:30
Marshall LeeandGitHub dabae570b1 ci: add spellcheck.dic validation (#7062) 2025-01-10 13:39:23 +01:00
TimoandGitHub 970d880ceb task: drop the join waker of a task eagerly (#6986) 2024-12-29 18:17:02 +01:00
NoisyandGitHub bfa8cadaa0 chore: spelling and date format Corrections (#7018) 2024-12-10 13:16:41 +01:00
Ariel Ben-YehudaandGitHub 48e07a6d10 taskdump: add accessor methods for backtrace (#6975) 2024-12-09 16:16:09 +09:00
Russell CohenandGitHub da745ff335 metrics: add H2 Histogram option to improve histogram granularity (#6897) 2024-10-21 14:05:45 +02:00
Alice RyhlandGitHub 21cf5a5469 runtime: avoid pointer casts in IO driver on miri (#6859)
Signed-off-by: Alice Ryhl <[email protected]>
2024-09-23 20:32:37 +02:00
Alice RyhlandGitHub 91169992b2 io: recommend OwnedFd with AsyncFd (#6821)
Signed-off-by: Alice Ryhl <[email protected]>
2024-09-06 09:52:08 +02:00
Russell CohenandGitHub cba86cf1b1 metrics: add MetricAtomicU64 and use in metrics (#6574) 2024-05-23 18:41:01 +02:00
Alice RyhlandGitHub bdf4c142c9 fs: rewrite file system docs (#6467) 2024-04-11 10:33:51 +02:00
Val LorentzandGitHub db6929ad62 task: fix documentation links (#6336) 2024-02-11 15:08:01 +01:00
M.Amin RayejandGitHub 53f9e5a357 ci: make sure dictionary words are sorted and unique (#6316) 2024-01-31 16:11:54 +03:30
Owen LeungandGitHub 131e7b4e49 ci: add spellchecking (#6297) 2024-01-29 10:53:43 +01:00