Commit Graph
4423 Commits
Author SHA1 Message Date
Jess Izen a8435c0fc8 examples: add FD table pre-warming example (#7978) 2026-03-26 08:17:27 -07:00
Charlie Tonneslan 467d614267 bench: use is_multiple_of instead of manual modulo check (#7984)
Addresses clippy::manual_is_multiple_of warning on latest stable.
2026-03-22 14:00:12 +01:00
Martin Grigorov 66c786540e chore: Do not show "Available on non-loom only." doc label (#7977)
* chore: Do not show "Available on non-loom only." doc label

Closes #7976

Uses the unstable #[doc(cfg()]. https://github.com/rust-lang/rust/issues/43781

* Use build.rs to detect nightly builds

* Use `docsrs` instead of `nightly`. Drop build.rs

* Use doc(auto_cfg(hide(config_name)))

* Use same nightly on CirrusCI (FreeBSD) as on Github Actions CI
2026-03-18 15:14:02 +02:00
figsoda dd1196d369 ci: patch workspace members to disambiguate --package (#7967) 2026-03-18 07:27:46 +01:00
figsoda 2db0070eb8 stream: impl FromStream for std::collections::* (#7966) 2026-03-16 16:00:49 +01:00
Russell Cohen 26de3187e7 runtime: add tokio::runtime::worker_index() (#7921) 2026-03-14 22:44:41 -07:00
Chris Denton d3c7f56c10 ci: workaround for OpenOptionsExt in 1.94.0 (#7968) 2026-03-13 10:53:13 +00:00
Alex Gaynor ee04abe797 bench: add remote_spawn benchmark for inject queue contention (#7944) 2026-03-11 10:13:39 +01:00
figsoda aa1e7e2b9d stream: impl FromStream for BTreeSet (#7954) 2026-03-09 10:20:21 +00:00
ADD-SP 961757f548 ci: freeze rustc on 1.93.1 (#7961) 2026-03-09 07:43:48 +01:00
Carl Lerche e67cd87f71 chore: link to tokioconf.com (#7953) 2026-03-06 12:00:42 -08:00
winlogon a502d1b5c8 loom: remove StaticAtomicU64 (#7902) 2026-03-04 16:16:50 +01:00
ADD-SP 0273e45ead chore: prepare Tokio v1.50.0 (#7934) tokio-1.50.0 2026-03-03 10:39:42 +01:00
ADD-SP e3ee4e58dc chore: prepare tokio-macros v2.6.1 (#7943) tokio-macros-2.6.1 2026-03-02 19:17:41 +01:00
Evan Cameron 8c980ea75a io: add write_all_vectored to tokio-util (#7768) 2026-02-27 11:16:43 +01:00
Mattia Pitossi e35fd6d6b7 ci: fix patch during clippy step (#7935)
* fix the ci issue

* fix readme

* fix ci
2026-02-27 09:40:05 +02:00
LIParadise 03fe44c103 runtime: fix event_interval doc (#7932) 2026-02-24 16:30:53 +01:00
ADD-SP d18e5dfbb0 io: fix race in Mock::poll_write (#7882) 2026-02-23 20:49:37 -08:00
ADD-SP f21f2693f0 runtime: fix race condition during the blocking pool shutdown (#7922) 2026-02-23 22:50:27 +01:00
Andrew Lin d81e8f0acb macros: remove (most) local use declarations in tokio::select! (#7929) 2026-02-23 10:46:18 +01:00
Phong Chuong 25e7f2641e rt: fix missing quotation in docs (#7925) 2026-02-20 23:41:12 +02:00
Phong Chuong e1a91ef114 util: fix typo in docs (#7926) 2026-02-20 23:36:27 +02:00
0rlych1kk4 1b11840f53 task: clarify when to use spawn_blocking vs dedicated threads (#7923) 2026-02-20 14:19:27 +00:00
Maxime Grenu 09f92b5aed sync: clarify that recv returns None once closed and no more messages (#7920)
The previous documentation stated:
  'As such, Receiver::poll returns Ok(Ready(None))'

This was misleading: when all Sender handles are dropped, recv does NOT
immediately return None. Buffered messages already in the channel can
still be received. Only after all senders are dropped AND the channel
has been fully drained does recv return None.

Also update the method reference from the internal Receiver::poll to the
public API: Receiver::recv and Receiver::poll_recv.

Closes #6053
2026-02-20 08:34:11 +00:00
Maxime Grenu e65040f061 sync: clarify RwLock fairness documentation (#7919)
The previous wording 'if a task that wishes to acquire the write lock is
at the head of the queue, read locks will not be given out' was
misleading: it implied that readers are only blocked when the writer is
first in the queue. In reality, due to the FIFO ordering, any write
request queued *before* a read request will block that reader.

Replace with a more accurate description: 'a read lock will not be given
out until all write lock requests that were queued before it have been
acquired and released.'

Closes #6901
2026-02-19 15:57:42 +01:00
ADD-SP c23735d43b runtime: fix TOCTOU issue when decreasing num_idle_threads (#7918) 2026-02-17 21:50:26 -08:00
Varun Chawla d83921bc51 runtime: fix double increment of num_idle_threads on shutdown (#7910) 2026-02-16 23:19:50 -08:00
cui 96f64f4ee2 codec: fix is_readable should be buffer empty or not (#7912) 2026-02-16 17:33:35 +01:00
Zen 00d10c22f8 task: fix two typos (#7913) 2026-02-16 10:51:10 +00:00
Zen a25d95a8c4 io: clarify the behavior of AsyncWriteExt::shutdown() (#7908) 2026-02-14 11:42:24 -08:00
Stepan Koltsov 9e7e1ef7ad io: Explain how to flush stdout/stderr (#7904) 2026-02-12 14:06:48 +00:00
Mattia Pitossi 5bcd7c1d09 task: fix task module feature flags in docs (#7891) 2026-02-12 12:27:25 +01:00
winlogon 2486d49778 tests: skip issue_7144 if strace is missing (#7903) 2026-02-12 12:26:20 +01:00
Tim Vilgot Mikael Fredenberg 9dacb1c53e tokio: replace some futures with poll_fn (#7895) 2026-02-09 13:30:31 +01:00
Alex H 8167f87137 task: add AbortOnDrop (#7855) 2026-02-09 13:23:46 +01:00
Mattia Pitossi 159f70bc55 ci: fix ambiguity issue during tokio releases (#7848) 2026-02-09 11:04:59 +01:00
Jack Kleeman d1e4db1018 sync: drop rx waker when oneshot receiver is dropped (#7886) 2026-02-09 10:17:45 +01:00
DaniPopes 530af3f331 runtime: correct the default thread name in docs (#7896) 2026-02-08 03:34:44 -08:00
George Burgess IV d89e998922 net: fix GET_BUF_SIZE constant for target_os = "android" (#7889)
We recently tried to upgrade Android to the newest tokio, but tests that
use these constants fail, since Android is provided the non-Linux
constants.
2026-02-06 15:08:04 +01:00
tsyrulb 306ed1c30b stream: bump minimum tokio version to 1.38 (#7887)
tokio-stream 0.1.18 added `Stream::size_hint` for
`ReceiverStream` and `UnboundedReceiverStream` (PR #7492),
which calls `Receiver::is_closed()` and `Receiver::len()`
(added in tokio 1.37.0) and `Receiver::capacity()` and
`Receiver::max_capacity()` (added in tokio 1.38.0).

The declared minimum of tokio 1.15.0 is no longer sufficient,
causing compilation failures when resolved via
`-Z direct-minimal-versions`.

Refs: #7492
2026-02-06 11:45:30 +01:00
Tim Vilgot Mikael Fredenberg 7e952697e8 signal: specialize windows Registry (#7885) 2026-02-06 11:29:34 +01:00
n4n5 c0943f99f0 rt: clarify the documentation of Runtime::spawn (#7803) 2026-02-04 11:27:46 +01:00
DaniPopes 187a2146a7 runtime: shorten default thread name to fit in Linux limit (#7880)
Linux thread names are truncated at 15 characters.
Currently, Tokio threads show up as "tokio-runtime-w", whereas
shortening "runtime" to "rt" would make the thread name perfectly fit
in the 15 character limit.
2026-02-03 16:23:30 +01:00
Muzzaiyyan Hussain f61374f931 io: fix incorrect and confusing AsyncWrite documentation (#7875) 2026-02-03 16:22:34 +01:00
ADD-SP 0d6c7af3e4 runtime: wake deferred tasks before entering block_in_place (#7879) 2026-02-03 14:07:09 +01:00
Alice Ryhl 9dc9b53ae1 io: implement vectored writes for write_buf (#7871) 2026-01-30 19:52:57 +01:00
Tim Vilgot Mikael Fredenberg c3b31ba2ab signal: guarantee that listeners never return None (#7869) 2026-01-29 19:24:47 -08:00
Alice Ryhl b68ea4156a io: hardcode platform list for poll_write (#7872) 2026-01-29 15:12:10 +01:00
Chinmoy Das 8f6d0864c3 macros: improve error message for return type mismatch in #[tokio::main] (#7856) 2026-01-25 01:09:05 +09:00
mu001999 63abec0525 macros: use call_site hygiene to avoid unused qualification (#7866) 2026-01-22 14:54:43 +01:00