4605 Commits
Author SHA1 Message Date
Minh VuandGitHub dd344a550c io: complete zero-length memory stream operations (#8323) 2026-08-06 12:01:12 +02:00
Alex GaynorandGitHub 108d6d3dc0 runtime: refactor the spawn blocking queue to make adding a new sharded implementation easy (#8135) 2026-07-31 22:27:54 +02:00
Motoyuki KimuraandGitHub adc2ae7af2 rt: add error documentation for runtime::Builder (#8297) 2026-07-30 12:29:09 +02:00
Geoffry SongandGitHub dc48a05132 runtime: move block_in_place setup into a non-generic function (#8315) 2026-07-30 11:05:04 +02:00
Dirkjan OchtmanandGitHub 4308c74a65 chore: prepare tokio-macros v2.7.2 (#8330) 2026-07-29 15:14:27 +02:00
Joel DiceandGitHub 1a2dbbaa21 net: enable various tests for WASI (#8313)
These tests were temporarily disabled until required `wasi-libc` fixes made
their way into a Rust release.  Now that that has happened, we can enable them.

Note that `send_to_recv_closed_returns_err` remains disabled for a bit longer.
The applicable `wasi-libc` bug was masking a separate bug in Wasmtime, fixed
[here](https://github.com/bytecodealliance/wasmtime/pull/13933).  Once that fix
makes its way into a release (presumably v48.0.0), we'll finally be able enable
that test, and that should be the last of the
temporarily-disabled-on-WASI-due-to-bugs tests.
2026-07-28 11:38:34 +02:00
K-tecchanandGitHub df28ffe61d rt: correct tick to tick_op in set_readiness internal docs (#8322) 2026-07-27 08:11:09 +02:00
Paolo BarboliniandGitHub 6a058770e9 macros: upgrade syn to v3 (#8304) 2026-07-26 11:26:19 +00:00
Alice RyhlandGitHub 818e2dd866 time: adjust tests::time_rt::tickspace (#8318) 2026-07-25 22:09:09 +02:00
Tim Vilgot Mikael FredenbergandGitHub 460dc16d19 tokio-test: fix semicolon_in_expressions_from_macros lint (#8317) 2026-07-25 19:39:39 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Mattia Pitossi
2120bee47f ci: bump actions/labeler from 6 to 7 (#8316)
Bumps [actions/labeler](https://github.com/actions/labeler) from 6 to 7.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mattia Pitossi <[email protected]>
2026-07-23 06:31:42 +00:00
kai-xlrandGitHub d1d639fbe8 docs: add step-by-step workflow in contributing guidelines (#3865) (#8306) 2026-07-23 08:00:51 +02:00
Joel DiceandGitHub 5760ccdc37 ci: pin Wasmtime version(s) in CI (#8314)
Per https://github.com/bytecodealliance/wasmtime/pull/13558, Wasmtime v46.0.1
was the last release to support `wasm32-wasip1-threads`, so we use that for the
WASIp1 testing.

For WASIp2, we should be able to use any recent version of Wasmtime, but we pin
to a specific version anyway to avoid surprises.
2026-07-23 07:57:22 +02:00
Alice RyhlandGitHub bc0933ccff chore: prepare tokio-stream v0.1.19 (#8310) tokio-stream-0.1.19 2026-07-22 09:49:29 +02:00
Alex TouchetandGitHub e3786d0090 readme: remove obsolete TokioConf notices (#8311) 2026-07-22 07:36:16 +00:00
Alice RyhlandGitHub f2189d3bd6 chore: prepare tokio-util v0.7.19 (#8309) tokio-util-0.7.19 2026-07-21 14:09:36 +02:00
Joel DiceandGitHub 52f2745c18 net: re-enable tcp_stream::try_read_buf test for WASI (#8305) 2026-07-21 10:12:54 +02:00
Mattia PitossiandGitHub ac6869a431 rt: remove unstable cfgs leftovers after local runtime stabilization (#8298) 2026-07-20 20:12:30 +02:00
ADD-SPandGitHub 75fef53d0a chore: prepare Tokio v1.53.1 (#8303) tokio-1.53.1 2026-07-20 19:05:08 +02:00
Jens Holdgaard PedersenandGitHub ae9d011213 signal: restore MSRV by removing OnceLock::wait from the Windows handler (#8300)
OnceLock::wait was stabilized in Rust 1.86, so its use in the Windows
console ctrl handler broke tokio's declared rust-version of 1.71 on
windows targets in 1.53.0 (any cargo check with a 1.71..1.86 toolchain
fails with E0599).

The wait existed only because SetConsoleCtrlHandler was called inside
REGISTRY's get_or_init closure, i.e. before the OnceLock was actually
initialized, leaving a window where an invoked handler could observe an
uninitialized REGISTRY. Initialize the registry first and register the
OS handler afterwards (exactly once, through a second OnceLock that
also caches a registration failure so every subsequent call reports the
same error, matching the previous behavior). The handler can then rely
on plain get(): registration happens-after initialization, so an
invoked handler always finds the registry.

Verified with cargo +1.71 check -p tokio --features full
--target x86_64-pc-windows-msvc (fails with the reported E0599 before
this change, clean after) and --all-targets on stable for the same
target.

Fixes #8299
2026-07-20 19:04:08 +02:00
ADD-SPandGitHub eb4988dc2e time: fix the loom test of the race between cancellation/insertion (#8302) 2026-07-20 19:10:31 +08:00
91d3b4c0bc time: fix alt timer cancellation and insertion race (#8252)
Co-authored-by: ADD-SP <[email protected]>
2026-07-20 18:32:46 +08:00
K-tecchanandGitHub a46338401b runtime: remove dead link definition in Runtime::block_on (#8301) 2026-07-20 13:47:27 +08:00
Alice RyhlandGitHub be689a35f5 chore: prepare Tokio v1.53.0 (#8294) tokio-1.53.0 2026-07-17 10:12:50 +02:00
Alice RyhlandGitHub 50f76c71ec chore: prepare tokio-macros v2.7.1 (#8295) tokio-macros-2.7.1 2026-07-17 10:12:38 +02:00
Alice Ryhl f61fccad3c Merge 'tokio-1.52.4' into 'master' (#8290) 2026-07-16 13:27:30 +00:00
Alice RyhlandGitHub efdba5fcf0 chore: prepare Tokio v1.52.4 (#8289) tokio-1.52.4 2026-07-16 15:23:48 +02:00
Alice Ryhl b0ba02e755 Merge 'tokio-1.51.4' into 'tokio-1.52.x' (#8288) 2026-07-16 12:18:21 +00:00
Alice Ryhl 7bcd2d343d taskdump: remove crate disambiguators from output (#8288) 2026-07-16 12:17:13 +00:00
Alice RyhlandGitHub f84b209126 chore: prepare Tokio v1.51.4 (#8286) tokio-1.51.4 2026-07-16 13:59:24 +02:00
Amey PawarandGitHub eacb98e189 runtime: don't skip the driver when before_park schedules work (#8222) 2026-07-16 13:16:47 +02:00
Minh VuandGitHub 5e16ee00fa task: avoid replacing the JoinQueue waker in try_join_next (#8279)
Do not poll pending join handles with a noop waker, since that can replace the waker registered by poll_join_next and leave its caller asleep.
2026-07-16 13:15:11 +02:00
cong-orandGitHub 88212ab64a sync: document memory ordering guarantees for Semaphore (#8119) 2026-07-16 09:43:52 +02:00
kai-xlrandGitHub 9cae638de6 examples: add UDP binding to all interfaces docs (#8283)
Closes #6737
2026-07-15 17:05:27 +00:00
Tobias BucherandGitHub 315a320e96 io: fix typo in SimplexStream docs (#8284) 2026-07-15 16:51:52 +00:00
MAAZIZ Adel AyoubandGitHub dac81bf8c8 sync: wake mpsc receiver when a queued reserve[_many] returns permits (#8260) 2026-07-14 09:56:18 +02:00
Minh VuandGitHub 145f124d98 ci: preserve QEMU exit status in uring kernel tests (#8271) 2026-07-14 09:52:32 +02:00
Minh VuandGitHub 6e8475dd60 time: wake DelayQueue after resetting to expired (#8274)
Resetting an item into the expired stack bypassed the existing Sleep reset
path, leaving a pending consumer asleep until an unrelated deadline.
2026-07-14 09:33:59 +02:00
Mattia PitossiandGitHub b6f30cae9a rt: flush CQE in case of CQE overflow (#8277) 2026-07-13 19:33:23 +08:00
Rachit2323andGitHub 4638b65f9c stream: implement Peekable::size_hint (#8109) 2026-07-13 13:00:59 +02:00
kai-xlrandGitHub fe258f5e6d net: use getpeereid for QNX peer credentials (#8270)
QNX (nto) does not provide LOCAL_PEEREID, which is used by the
impl_netbsd module. This causes a compilation failure on QNX.

Use getpeereid() instead, following the same pattern as impl_dragonfly
and impl_aix. This provides uid/gid but not pid, so UCred::pid()
returns None on QNX.
2026-07-13 12:36:10 +02:00
kai-xlrandGitHub 33f46a5395 io: add warning about stdout reordering with multiple handles (#8276) 2026-07-12 21:12:48 +08:00
linkmauveandGitHub 9c465e2f42 tokio-stream: Simplify TakeWhile with Option::filter() (#8268)
Option::filter() exists since Rust 1.27.0, and is much more readable
than the open coded variant that was there before, using
Option::and_then().

This has been found by clippy.
2026-07-10 21:33:24 +02:00
linkmauveandGitHub d5950a8890 refactor: fix variable name typos (#8267) 2026-07-10 20:53:52 +02:00
linkmauveandGitHub c793a631f7 fs: add safe impl From<OwnedFd> for File (#8266)
This impl was missing to be able to create a tokio::fs::File directly
from an OwnedFd, which can be done in a safe way.  Going through RawFd
required unsafe for the same operation.

And same for Windows using a OwnedHandle instead.
2026-07-10 20:02:38 +02:00
bfd4ddf597 docs: correct spelling typos in comments and doc strings (#8263)
Fix several spelling errors found in comments and documentation:
- mulithreading -> multithreading (tcp_shutdown.rs)
- succeded -> succeeded (signal/windows/sys.rs)
- implementor/implementors -> implementer/implementers (multiple files)

Co-authored-by: maxtaran2010 <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: Alice Ryhl <[email protected]>
2026-07-10 11:03:18 +00:00
Alice RyhlandGitHub cd3bcca32b taskdump: remove crate disambiguators from output (#8264) 2026-07-10 12:09:45 +02:00
wanglei01andGitHub c4c6265a07 net: support Nuttx target os (#8259)
Signed-off-by: wanglei <[email protected]>
2026-07-07 16:01:24 +02:00
Dongpo LiuandGitHub bb2815ae23 task: explain why yield_now defers its waker (#8254)
Since #5223, `yield_now` does not wake the task immediately. Instead,
the waker is handed to the scheduler via `context::defer`, which wakes
it only after running out of ready tasks and polling the IO/timer
driver. Add a comment explaining this, as the reasoning is not obvious
from the bare `context::defer` call.
2026-07-07 15:40:18 +02:00
Leo BlöcherandGitHub e06f16259d sync: reset Chan::rx_waker in chan::Rx's Drop impl (#8095)
I recently fixed a memory leak in an application where tokio's RawTask
storage was being kept alive by a leaked Waker. The task itself was
polling an `mpsc::Receiver` before then being aborted. During cleanup,
all references to the RawTask were dropped, except for the one stored in
`mpsc::chan::Chan::rx_waker`. While the `Receiver` was dropped as part
of the task's future, one of the channel's `Sender`s was leaked outside
the task. This meant the `Chan` was never dropped and its `rx_waker`
contained the leaked Waker.

I fixed the leak by properly cleaning up the `Sender`, but I also think
keeping `rx_waker` around in this case is unnecessary. Once `chan::Rx`
is dropped, it can't be polled anymore, so waking up the registered task
will always be spurious.

The commit includes a regression test to illustrate the problem that is
fixed by removing the waker explicitly.
2026-07-06 14:15:51 +02:00