]>
git.feebdaed.xyz Git - 0xmirror/tokio.git/log
Alex Bakon [Tue, 19 Aug 2025 11:42:55 +0000 (07:42 -0400)]
time: reduce the generated code size of `Timeout<T>::poll` (#7535)
Asger Hautop Drewsen [Fri, 15 Aug 2025 07:52:12 +0000 (09:52 +0200)]
task: implement `Ord` for `task::Id` (#7530)
Logan Praneis [Thu, 14 Aug 2025 01:25:55 +0000 (20:25 -0500)]
net: qualify that `SO_REUSEADDR` is only set on Unix (#7533)
CrazyFrog [Wed, 13 Aug 2025 10:57:45 +0000 (12:57 +0200)]
ci: update GitHub actions/checkout to v5 (#7529)
Noam Soloveichik [Mon, 11 Aug 2025 16:26:01 +0000 (19:26 +0300)]
net: clarify socket gets closed on drop (#7526)
Qi [Sun, 10 Aug 2025 12:31:09 +0000 (20:31 +0800)]
ci: remove a typo from `spellcheck.dic` (#7524)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
mxsm [Sat, 9 Aug 2025 14:29:43 +0000 (22:29 +0800)]
runtime: fix a typo in comment of `MAX_LIFO_POLLS_PER_TICK` (#7520)
Motoyuki Kimura [Fri, 8 Aug 2025 10:09:31 +0000 (19:09 +0900)]
ci: pin the rust version for wasm tests (#7518)
Qi [Fri, 8 Aug 2025 07:54:25 +0000 (15:54 +0800)]
task: inline the docs of `TaskTracker` while re-exporting it (#7516)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Motoyuki Kimura [Fri, 8 Aug 2025 07:51:42 +0000 (16:51 +0900)]
fs: add io_uring `open` operation (#7321)
Qi [Wed, 6 Aug 2025 01:01:27 +0000 (09:01 +0800)]
net: render the `cygwin` in the docs of `quickack` and `set_quickack` (#7515)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Luca Bruno [Mon, 4 Aug 2025 13:26:11 +0000 (15:26 +0200)]
future: clarify the fairness of `FutureExt` for cancellation adapters (#7512)
This fixes the docstrings on `FutureExt` so that the bias and fairness
notes are correct and consistent in all cases.
All cancellation-related wrappers are biased towards the completion of
the inner future, but they do initially check if the token is
already cancelled at construction time.
Motoyuki Kimura [Mon, 4 Aug 2025 10:36:17 +0000 (19:36 +0900)]
ci: fix clippy warnings triggered under specific cfg (#7495)
Michael Zhao [Sun, 3 Aug 2025 18:27:37 +0000 (11:27 -0700)]
process: upgrade `Command::spawn_with` to use `FnOnce` (#7511)
Conrad Ludgate [Sun, 3 Aug 2025 18:00:33 +0000 (19:00 +0100)]
task: fix flaky joinmap test during abort (#7509)
Alice Ryhl [Sun, 3 Aug 2025 09:12:41 +0000 (11:12 +0200)]
chore: prepare tokio-util v0.7.16 (#7507)
Conrad Ludgate [Sun, 3 Aug 2025 07:58:28 +0000 (08:58 +0100)]
task: stabilise `JoinMap` (#7075)
Alice Ryhl [Sun, 3 Aug 2025 07:42:30 +0000 (09:42 +0200)]
sync: document cancel safety on `SetOnce::wait` (#7506)
Lucas Black [Fri, 1 Aug 2025 19:26:33 +0000 (12:26 -0700)]
codec: also apply capacity to read buffer in `Framed::with_capacity` (#7500)
Alice Ryhl [Fri, 1 Aug 2025 11:21:45 +0000 (13:21 +0200)]
Merge 'tokio-1.47.1' into 'master'
Alice Ryhl [Fri, 1 Aug 2025 11:20:34 +0000 (13:20 +0200)]
chore: prepare Tokio v1.47.1 (#7504)
Alice Ryhl [Fri, 1 Aug 2025 10:59:58 +0000 (12:59 +0200)]
Merge 'tokio-1.43.2' into 'tokio-1.47.x' (#7503)
Alice Ryhl [Fri, 1 Aug 2025 10:57:50 +0000 (12:57 +0200)]
chore: prepare Tokio v1.43.2 (#7502)
Alice Ryhl [Fri, 1 Aug 2025 10:32:37 +0000 (12:32 +0200)]
blocking: clarify that spawn_blocking is aborted if not yet started (#7501)
Alice Ryhl [Thu, 31 Jul 2025 14:45:10 +0000 (16:45 +0200)]
readme: add 1.47 as LTS release (#7497)
(cherry picked from commit
ad2e19ffe193b7bce76eab9a51037089da4bc6dc )
Alice Ryhl [Fri, 1 Aug 2025 09:27:15 +0000 (11:27 +0200)]
process: fix panic from spurious pidfd wakeup (#7494)
Lucas Black [Fri, 1 Aug 2025 09:23:22 +0000 (02:23 -0700)]
codec: add `FramedWrite::with_capacity` (#7493)
Alice Ryhl [Fri, 1 Aug 2025 08:50:10 +0000 (10:50 +0200)]
ci: add lockfile for LTS branch
This is to fix CI failures from backtrace in rustdoc jobs.
Alice Ryhl [Thu, 31 Jul 2025 14:45:10 +0000 (16:45 +0200)]
readme: add 1.47 as LTS release (#7497)
Qi [Thu, 31 Jul 2025 11:58:01 +0000 (19:58 +0800)]
net: add `TcpStream::quickack` and `TcpStream::set_quickack` (#7490)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Motoyuki Kimura [Thu, 31 Jul 2025 11:52:28 +0000 (20:52 +0900)]
ci: add kernel-version-test workflow for io_uring tests (#7486)
Łukasz Sobczak [Tue, 29 Jul 2025 15:35:09 +0000 (17:35 +0200)]
sync: umplement `Stream::size_hint` for `ReceiverStream` and `UnboundedReceiverStream` (#7492)
yanyuxing [Tue, 29 Jul 2025 10:09:13 +0000 (18:09 +0800)]
future: add adapters of `CancellationToken` for `FutureExt` (#7475)
Luca Bruno [Tue, 29 Jul 2025 09:07:58 +0000 (11:07 +0200)]
net: add `SocketAddr::as_abstract_name` (#7491)
Jess Izen [Tue, 29 Jul 2025 05:40:57 +0000 (22:40 -0700)]
metrics: reorder metrics to be grouped by cfg-gates (#7453)
James Kay [Mon, 28 Jul 2025 11:59:00 +0000 (12:59 +0100)]
macros: add "local" runtime flavor (#7375)
tkoyasak [Sun, 27 Jul 2025 00:28:24 +0000 (09:28 +0900)]
sync: fix broken link of Python `asyncio.Event` in `SetOnce` docs (#7485)
tkoyasak [Sun, 27 Jul 2025 00:24:09 +0000 (09:24 +0900)]
changelog: fix incorrect PR number for 1.47.0 (#7484)
Daksh [Sat, 26 Jul 2025 14:50:58 +0000 (10:50 -0400)]
chore: prepare Tokio v1.47.0 (#7482)
Aria Andika [Sat, 26 Jul 2025 13:45:34 +0000 (20:45 +0700)]
sync: add `sync::Notify::notified_owned()` (#7465)
Daksh [Fri, 25 Jul 2025 08:29:14 +0000 (04:29 -0400)]
sync: add `SetOnce` (#7418)
Conrad Ludgate [Tue, 22 Jul 2025 13:52:54 +0000 (14:52 +0100)]
task: remove raw-entry feature from hashbrown dep (#7252)
Qi [Mon, 21 Jul 2025 01:48:04 +0000 (09:48 +0800)]
ci: unfreeze wasm-unknown-unknown from rustc 1.81 (#7471)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Co-authored-by: Taiki Endo <te316e89@gmail.com>
Taiki Endo [Sun, 20 Jul 2025 08:19:26 +0000 (17:19 +0900)]
ci: use ubuntu-24.04-arm instead of ubuntu-22.04-arm (#7470)
Stepan Tubanov [Sun, 20 Jul 2025 02:03:29 +0000 (06:03 +0400)]
sync: fix `CancellationToken` failing to cancel the ready futures (#7462)
This patch fixes an issue where the `CancellationToken::run_until_cancelled` never cancels the `Future` that returns `Ready` at the first `poll`.
---------
Co-authored-by: Luca BRUNO <lucab@lucabruno.net>
Qi [Mon, 14 Jul 2025 08:28:02 +0000 (16:28 +0800)]
sync: remove duplicated code in `OnceCell` tests (#7458)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Qi [Sat, 12 Jul 2025 14:37:21 +0000 (22:37 +0800)]
ci: cleanup legacy `R-loom-multi-thread-alt` label from the labeler (#7457)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Pepijn Van Eeckhoudt [Fri, 11 Jul 2025 08:07:44 +0000 (10:07 +0200)]
coop: add `cooperative` and `poll_proceed` (#7405)
Jess Izen [Wed, 9 Jul 2025 13:03:22 +0000 (06:03 -0700)]
metrics: properly annotate required features for 64-bit-only metrics (#7449)
Qi [Wed, 9 Jul 2025 11:52:33 +0000 (19:52 +0800)]
runtime: cleanup legacy tests of alt multi-threaded runtime (#7451)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Orson Peters [Wed, 9 Jul 2025 10:09:34 +0000 (12:09 +0200)]
sync: use `swap` in `AtomicWaker::wake` (#7450)
Aaron Chen [Wed, 9 Jul 2025 06:34:24 +0000 (14:34 +0800)]
chore: update CI to clippy 1.88 (#7452)
Erich Gubler [Mon, 7 Jul 2025 17:49:12 +0000 (13:49 -0400)]
deps: upgrade `windows-sys` from 0.52 to 0.59 (#7117)
Thomas de Zeeuw [Mon, 7 Jul 2025 11:45:30 +0000 (13:45 +0200)]
deps: update to socket2 v0.6 (#7443)
Qi [Mon, 7 Jul 2025 11:04:08 +0000 (19:04 +0800)]
runtime: improve safety comments of `Readiness<'_>` (#7415)
Signed-off-by: ADD-SP <qiqi.zhang@konghq.com>
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
Co-authored-by: Alice Ryhl <aliceryhl@google.com>
Motoyuki Kimura [Sat, 5 Jul 2025 08:41:37 +0000 (17:41 +0900)]
runtime: fix handling of cancelled io_uring Ops (#7436)
Eliza Weisman [Fri, 4 Jul 2025 19:27:35 +0000 (12:27 -0700)]
chore: prepare to release v1.46.1 (#7444)
# 1.46.1 (July 4th, 2025)
This release fixes incorrect spawn locations in runtime task hooks for tasks
spawned using `tokio::spawn` rather than `Runtime::spawn`. This issue only
effected the spawn location in `TaskMeta::spawned_at`, and did not effect task
locations in Tracing events.
## Unstable
- runtime: add `TaskMeta::spawn_location` tracking where a task was spawned
([#7440)])
[#7440]: https://github.com/tokio-rs/tokio/pull/7440
Eliza Weisman [Fri, 4 Jul 2025 16:25:40 +0000 (09:25 -0700)]
runtime(unstable): fix task hook spawn locations for `tokio::spawn` (#7440)
## Motivation
Unfortunately, due to an oversight on my part, the capturing of spawn
locations was only tested with the `Runtime::spawn` method, and *not*
with `tokio::spawn`/`tokio::task::spawn`, which is how most tasks are
spawned in Real Life. And, it turned out that because this was not
tested...well, it was broken. Agh. My bad.
## Solution
Although the whole call chain for spawning tasks using `tokio::spawn`
was correctly annotated with `#[track_caller]`, the location wasn't
propagated correctly because of the `context::with_current(|handle| {
... })` closure that accesses the current runtime. Because the call to
spawn the task occurs inside a closure, the *closure*'s location is
captured instead of the caller. This means any task spawned by
`tokio::spawn` records its location as being in
`tokio/src/task/spawn.rs`, which is not what we'd like. This commit
fixes that by capturing the spawn location outside the `with_current`
closure and passing it in explicitly.
I've updated the tests to also spawn a task with `tokio::spawn`, so that
we ensure this works correctly.
shangchenglumetro [Fri, 4 Jul 2025 09:29:27 +0000 (17:29 +0800)]
chore: fix some minor typos in the comments (#7442)
Signed-off-by: shangchenglumetro <shuang.cui@live.com>
Alice Ryhl [Wed, 2 Jul 2025 09:27:11 +0000 (11:27 +0200)]
changelog: fix typo in `pipe::OpenOptions` for 1.46.0 (#7439)
Eliza Weisman [Wed, 2 Jul 2025 08:20:42 +0000 (01:20 -0700)]
chore: prepare Tokio v1.46.0 (#7437)
Eliza Weisman [Mon, 30 Jun 2025 18:13:42 +0000 (11:13 -0700)]
rt(unstable): add spawn `Location` to `TaskMeta` (#7417)
As described in issue #7411, task spawning APIs are currently annotated
with `#[track_caller]`, allowing us to capture the location in the user
source code where the task was spawned. This is used for `tracing`
events used by `tokio-console` and friends. However, this information is
*not* exposed to the runtime `on_task_spawn`, `on_before_task_poll`,
`on_after_task_poll`, and `on_task_terminate` hooks, which is a shame,
as it would be useful there as well.
This branch adds the task's spawn location to the `TaskMeta` struct
provided to the runtime's task hooks. This is implemented by storing a
`&'static Location<'static>` in the task's `Core` alongside the
`task::Id`. In [this comment][1], @ADD-SP suggested storing the
`Location` in the task's `Trailer`.
I opted to store it in the `Core` instead, as the `Trailer` is intended
to store "cold" data that is only accessed when the task _completes_,
and not on every poll. Since the task meta is passed to the
`on_before_task_poll` and `on_after_task_poll` hooks, we would be
accessing the `Trailer` on polls if we stored the `Location` there.
Therefore, I put it in the `Core`, instead, which contains data that we
access every time the task is polled.
Closes #7411
[1]: https://github.com/tokio-rs/tokio/issues/7411#issuecomment-
2993377045
xumaple [Mon, 30 Jun 2025 13:31:04 +0000 (09:31 -0400)]
net: derive `Clone` for `net::unix::SocketAddr` (#7422)
Alice Ryhl [Mon, 30 Jun 2025 08:24:10 +0000 (10:24 +0200)]
fuzz: cfg fuzz tests under cfg(test) (#7428)
GarmashAlex [Fri, 27 Jun 2025 14:08:31 +0000 (17:08 +0300)]
net: update `AsRawFd` doc link to current Rust stdlib location (#7429)
Marshall Pierce [Fri, 27 Jun 2025 07:39:55 +0000 (01:39 -0600)]
net: allow `pipe::OpenOptions::read_write` on Android (#7426)
VolodymyrBg [Tue, 24 Jun 2025 13:15:39 +0000 (16:15 +0300)]
net: fix broken link of `RawFd` in `TcpSocket` docs (#7416)
Alice Ryhl [Sat, 21 Jun 2025 12:52:04 +0000 (14:52 +0200)]
benches: revert "properly gate unix benches" (#7412)
This reverts commit
933fa498d0bda193960784cb3f6a47be3bc1e492 .
Qi [Wed, 18 Jun 2025 22:32:41 +0000 (06:32 +0800)]
sync: improve docs of `tokio_util::sync::CancellationToken` (#7408)
Co-authored-by: Alice Ryhl <aliceryhl@google.com>
Qi [Wed, 18 Jun 2025 12:25:12 +0000 (20:25 +0800)]
docs: add a missing panic scenario of `time::advance` (#7394)
yanyuxing [Wed, 18 Jun 2025 08:25:41 +0000 (16:25 +0800)]
sync: add `DropGuardRef` for `CancellationToken` (#7407)
Alice Ryhl [Mon, 16 Jun 2025 07:49:00 +0000 (09:49 +0200)]
runtime: add `thread_park_ok` test (#7402)
Tim Vilgot Mikael Fredenberg [Wed, 11 Jun 2025 08:07:34 +0000 (10:07 +0200)]
benches: properly gate unix benches (#7392)
Motoyuki Kimura [Tue, 10 Jun 2025 18:26:23 +0000 (03:26 +0900)]
rt: add check for io_uring availability at runtime (#7357)
Geoffry Song [Tue, 10 Jun 2025 07:35:48 +0000 (00:35 -0700)]
task: add `AbortOnDropHandle::detach` (#7400)
Qi [Mon, 9 Jun 2025 07:32:59 +0000 (15:32 +0800)]
runtime: move ` impl Schedule for Arc<Handle>` (#7398)
Jess Izen [Mon, 9 Jun 2025 07:31:05 +0000 (00:31 -0700)]
macros: add biased mode to join! and try_join! (#7307)
Oliver E. Anderson [Sun, 8 Jun 2025 18:57:36 +0000 (20:57 +0200)]
io: document cancellation safety of `AsyncWriteExt::flush` (#7364)
Alice Ryhl [Sun, 8 Jun 2025 18:56:55 +0000 (20:56 +0200)]
task: disallow blocking in `LocalSet::{poll,drop}` (#7372)
Yuyi Wang [Sun, 8 Jun 2025 07:55:43 +0000 (15:55 +0800)]
net: add cygwin support (#7393)
Austin Bonander [Sat, 7 Jun 2025 11:10:48 +0000 (04:10 -0700)]
sync: add `same_channel` analogue to `OwnedPermit` (#7389)
tiif [Wed, 4 Jun 2025 07:55:27 +0000 (15:55 +0800)]
ci: enable tests using fcntl in miri (#7382)
Maximilian Hubert [Wed, 28 May 2025 19:24:53 +0000 (21:24 +0200)]
readme: fix double period in reactor description (#7363)
Qi [Wed, 28 May 2025 12:01:31 +0000 (20:01 +0800)]
time: cumulative minor improvements (#7358)
Jeff Vander Stoep [Wed, 28 May 2025 11:32:24 +0000 (13:32 +0200)]
examples: update rand crate to 0.9.1 (#7371)
Alice Ryhl [Wed, 28 May 2025 11:00:33 +0000 (04:00 -0700)]
io: clarify behavior of seeking when `start_seek` is not used (#7366)
Tim Vilgot Mikael Fredenberg [Tue, 27 May 2025 17:28:21 +0000 (19:28 +0200)]
chore: replace manual vtable definitions with `Wake` (#7342)
Alice Ryhl [Sat, 24 May 2025 14:32:44 +0000 (07:32 -0700)]
Merge tag 'tokio-1.45.1'
Alice Ryhl [Sat, 24 May 2025 14:27:50 +0000 (07:27 -0700)]
chore: prepare Tokio v1.45.1 (#7359)
Alice Ryhl [Sat, 24 May 2025 14:10:13 +0000 (07:10 -0700)]
sync: update broadcast docs on allocation failure (#7352)
Jason Gin [Fri, 23 May 2025 19:12:28 +0000 (15:12 -0400)]
rt: do not track time-based metrics on wasm32-unknown-unknown (#7322)
Alice Ryhl [Sat, 17 May 2025 09:24:36 +0000 (11:24 +0200)]
ci: update macros_type_mismatch for Rust 1.87.0 (#7339)
(cherry picked from commit
a48e418dcbbe7eccc7ea0f0071ca60aca21a61b7 )
Qi [Fri, 23 May 2025 17:24:29 +0000 (01:24 +0800)]
time: eliminate `UnsafeCell` around the `TimerShared` (#7329)
Qi [Fri, 23 May 2025 17:24:00 +0000 (01:24 +0800)]
runtime: eliminate unnecessary lfence while operating on `queue::Local<T>` (#7340)
Alice Ryhl [Tue, 20 May 2025 17:37:41 +0000 (18:37 +0100)]
runtime: various minor `LocalRuntime` improvements (#7346)
Motoyuki Kimura [Tue, 20 May 2025 17:36:52 +0000 (02:36 +0900)]
rt: add infrastructure code for io_uring (#7320)
Qi [Tue, 20 May 2025 12:55:28 +0000 (20:55 +0800)]
time: rename `cached_when` to `registered_when` (#7333)
剑来 [Sat, 17 May 2025 09:51:31 +0000 (17:51 +0800)]
net: fix docs for `recv_buffer_size` method (#7336)
Alice Ryhl [Sat, 17 May 2025 09:24:36 +0000 (11:24 +0200)]
ci: update macros_type_mismatch for Rust 1.87.0 (#7339)
Qi [Mon, 12 May 2025 14:32:23 +0000 (22:32 +0800)]
time: address style issues (#7328)