Commit Graph
4581 Commits
Author SHA1 Message Date
Alice Ryhl 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 Ryhl 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 Ryhl f84b209126 chore: prepare Tokio v1.51.4 (#8286) tokio-1.51.4 2026-07-16 13:59:24 +02:00
Amey Pawar eacb98e189 runtime: don't skip the driver when before_park schedules work (#8222) 2026-07-16 13:16:47 +02:00
Minh Vu 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-or 88212ab64a sync: document memory ordering guarantees for Semaphore (#8119) 2026-07-16 09:43:52 +02:00
kai-xlr 9cae638de6 examples: add UDP binding to all interfaces docs (#8283)
Closes #6737
2026-07-15 17:05:27 +00:00
Tobias Bucher 315a320e96 io: fix typo in SimplexStream docs (#8284) 2026-07-15 16:51:52 +00:00
MAAZIZ Adel Ayoub dac81bf8c8 sync: wake mpsc receiver when a queued reserve[_many] returns permits (#8260) 2026-07-14 09:56:18 +02:00
Minh Vu 145f124d98 ci: preserve QEMU exit status in uring kernel tests (#8271) 2026-07-14 09:52:32 +02:00
Minh Vu 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 Pitossi b6f30cae9a rt: flush CQE in case of CQE overflow (#8277) 2026-07-13 19:33:23 +08:00
Rachit2323 4638b65f9c stream: implement Peekable::size_hint (#8109) 2026-07-13 13:00:59 +02:00
kai-xlr 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-xlr 33f46a5395 io: add warning about stdout reordering with multiple handles (#8276) 2026-07-12 21:12:48 +08:00
linkmauve 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
linkmauve d5950a8890 refactor: fix variable name typos (#8267) 2026-07-10 20:53:52 +02:00
linkmauve 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 Ryhl cd3bcca32b taskdump: remove crate disambiguators from output (#8264) 2026-07-10 12:09:45 +02:00
wanglei01 c4c6265a07 net: support Nuttx target os (#8259)
Signed-off-by: wanglei <[email protected]>
2026-07-07 16:01:24 +02:00
Dongpo Liu 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öcher 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
Minh Vu 962420a4f3 codec: document UdpFramed decoder errors (#8248) 2026-07-06 13:44:17 +02:00
c637f6e73d fs: implement rename using io-uring (#7800)
---------

Co-authored-by: Mattia Pitossi <[email protected]>
Co-authored-by: vrtgs <[email protected]>
Co-authored-by: Daksh <[email protected]>
2026-07-03 11:18:20 +02:00
MAAZIZ Adel Ayoub dd683aba3f io: do not treat zero-length reads as EOF in Chain (#8251) 2026-07-03 08:31:33 +02:00
yoda77777 9fe3c5619d sync: clarify broadcast lagging semantics and pin them with tests (#8239)
Expand module and API docs around RecvError::Lagged / TryRecvError::Lagged
so capacity rounding, miss counts, and post-lag resume behavior are explicit.
Add integration tests covering slow receivers within capacity, overflow,
per-receiver lag, async recv, and cursor advancement after Lagged.
2026-07-01 16:34:17 +00:00
ebubekir karaca 448d1227a1 io: add #[inline] to IO trait impls for in-memory types (#8242)
Add #[inline] hints to poll_read, poll_write, start_seek, poll_complete, poll_fill_buf, and consume implementations for in-memory types (&[u8], Vec<u8>, Cursor<T>).

These are small, leaf implementations that benefit from cross-crate inlining, enabling LLVM to optimize call sites in downstream crates (including bounds-check elision and dead-code path elimination).

Benchmarks show ~16% improvement for slice reads and ~20% for cursor writes.
2026-07-01 18:28:37 +02:00
Minh Vu 98104c36f1 stream: honor StreamMap::next_many limit (#8215) 2026-07-01 17:55:20 +02:00
WhySoBad 61aeb33f51 net: re-enable miri for tests with readable readiness for a socket after a short read (#8238) 2026-07-01 17:52:48 +02:00
MAAZIZ Adel Ayoub 7b354d22a9 stream: stop polling the underlying stream once map_while yields None (#8233) 2026-06-30 11:18:31 +08:00
Shuang Li 4bbd2f4d7c docs: fix missing brace in reactor-refactor.md (#8236) 2026-06-28 23:42:35 +03:00
Tim Vilgot Mikael Fredenberg 930ca7436b signal: merge windows statics (#8231) 2026-06-28 10:24:29 -07:00
46c830117b fs(tests): do not leak FDs with shutdown background (#8184)
---------

Co-authored-by: Martin Grigorov <[email protected]>
Co-authored-by: Mattia Pitossi <[email protected]>
2026-06-25 17:20:53 +02:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 8f37021c16 ci: bump actions/checkout from 6 to 7 (#8229)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2026-06-25 09:25:48 +03:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> cdaa78fc37 ci: bump actions/cache from 5 to 6 (#8230)
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  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>
2026-06-25 08:51:00 +03:00
Matteo Monti dba1f20585 sync: implement cancellation token getter for drop guard (#8226) 2026-06-24 15:16:23 +02:00
Nanasi 95b8895da8 stream: update coop handling for empty and once (#8227) 2026-06-24 12:38:36 +00:00
Giorgio Maria Federico Birnthaler 73e8937cc5 util: fix typo in blocking_check.rs comment (#8223)
Replace 'i dont' with 'i don't' in the cfg(not(unix)) stub of
'check_socket_for_blocking'. The line is a casual internal comment
about why WASI is not yet supported there; it just needs the missing
apostrophe.
2026-06-23 20:03:19 +00:00
Ebrahim Eldesoky 630ec12a4f stream: use cooperative budgeting in tokio_stream::iter (#8218) 2026-06-23 11:42:03 +00:00
GraymanandTim Vilgot Mikael Fredenberg 060f66c665 docs: clarify cancel safety wording (#8181)
Co-authored-by: Tim Vilgot Mikael Fredenberg <[email protected]>
2026-06-23 09:13:01 +00:00
Prashant Singh Chouhan a59f9a0a94 test: add Spawn::poll_until_idle (#8213) 2026-06-23 10:25:14 +02:00
Robert Holt aee321206b metrics: add task schedule latency metric (#7986) 2026-06-23 10:23:34 +02:00
Tim Vilgot Mikael Fredenberg 5f52f113d4 tracing: remove unnecessary span clone (#8126) 2026-06-23 07:51:55 +00:00
Minh Vu f59aae423e stream: fix overflow in StreamMap::size_hint (#8216) 2026-06-23 09:49:54 +02:00
Minh Vu dc3a883b99 examples: connect proxy upstream per client (#8217) 2026-06-23 09:49:33 +02:00
Patrick WehbeandPatrick Wehbe 66e29121b3 time: fix reversed poll order in timeout doc (#8214)
The timeout doc said the timeout is checked before polling the future,
but the impl polls the future first and only then checks the delay (see
the Future impl for Timeout, which calls me.value.poll before
poll_delay). Reverse the clause to match the implementation. This is
also what makes the rest of the sentence correct: the future can
complete and exceed the timeout without an error precisely because it is
polled before the timeout is checked.

Co-authored-by: Patrick Wehbe <[email protected]>
2026-06-19 22:32:30 +02:00