4050 Commits

Author SHA1 Message Date
Carl Lerche
ec4b1d7215
chore: forward port 1.43.x tokio-1.44.2 2025-04-04 16:13:58 -07:00
Carl Lerche
e3c3a56718
Merge branch 'tokio-1.43.x' into forward-port-1.43.x 2025-04-04 16:11:53 -07:00
Carl Lerche
a7b658c35b
chore: prepare Tokio v1.43.1 release tokio-1.43.1 2025-04-04 08:31:21 -07:00
Carl Lerche
c1c8d1033d
Merge remote-tracking branch 'origin/tokio-1.38.x' into forward-port-1.38.x 2025-04-04 08:18:13 -07:00
Carl Lerche
aa303bc205
chore: prepare Tokio v1.38.2 release tokio-1.38.2 2025-04-02 21:58:38 -07:00
Carl Lerche
7b6ccb515f
chore: backport CI fixes 2025-04-02 14:34:28 -07:00
Carl Lerche
4b174ce2c9
sync: fix cloning value when receiving from broadcast channel
The broadcast channel does not require values to implement `Sync` yet it calls
the `.clone()` method without synchronizing. This is unsound logic. This patch
adds per-value synchronization on receive to handle this case. It is unlikely
any usage of the broadcast channel is currently at risk of the unsoundeness
issue as it requires accessing a `!Sync` type during `.clone()`, which would be
very unusual when using the broadcast channel.
2025-04-02 14:25:05 -07:00
Alice Ryhl
d413c9c02a
chore: prepare Tokio v1.44.1 (#7217) tokio-1.44.1 2025-03-13 09:13:25 +01:00
Carl Lerche
addbfb9204
rt: skip defer queue in block_in_place context (#7216) 2025-03-13 08:18:13 +01:00
Alice Ryhl
8182ecf262
chore: prepare Tokio v1.44.0 (#7202) tokio-1.44.0 2025-03-07 21:11:03 +01:00
Motoyuki Kimura
a258bff701
ci: enable printing in multi thread loom tests (#7200) 2025-03-07 13:33:16 +01:00
Stepan Koltsov
e076d21f67
process: clarify Child::kill behavior (#7162) 2025-03-06 14:59:51 +03:30
Noah Kennedy
042433cdcc
net: debug_assert on creating a tokio socket from a blocking one (#7166)
See #5595 and #7172.

This adds a debug assertion that checks that a supplied underlying std socket is set to nonblocking mode when constructing a tokio socket object from such an object.

This only works on unix.
2025-03-05 18:10:30 +00:00
M.Amin Rayej
0284d1b5c8
macros: make select! budget-aware (#7164) 2025-03-05 01:07:18 +03:30
Carl Lerche
710bc8071e
rt: coop should yield using waker defer strategy (#7185) 2025-03-04 15:02:43 +01:00
Alice Ryhl
a2b12bd579
readme: adjust release schedule to once per month (#7191) 2025-03-03 14:04:42 +03:30
Jonathan Hiles
e7b593cbee
process: fix grammar of the ChildStdin struct doc comment (#7192) 2025-03-03 13:01:35 +03:30
kilavvy
3aaf4a5377
coop: adjust grammar in tests/coop_budget.rs (#7173) 2025-03-03 09:59:03 +01:00
Alice Ryhl
8e741c1c0e
tokio: mark 1.43 as LTS (#7189) 2025-03-03 09:54:26 +01:00
dlzht
47d46455bd
util: optimize buffer reserve for AnyDelimiterCodec::encode (#7188) 2025-03-02 19:53:19 +03:30
Adriano Mourão
20c1fdc678
runtime: consistently use worker_threads instead of core_threads (#7186) 2025-02-28 10:19:24 +01:00
Josh Triplett
638ce93591
io: add read_exact_arc to safely read a new uninitialized Arc (#7165) 2025-02-27 14:07:49 +01:00
Kyle Cotton
c853991b1e
io: swap reader/writer in simplex doc test (#7176) 2025-02-25 14:49:19 +00:00
Josh Triplett
6d410f6c90
util: fix example of Buf implementor in StreamReader docs (#7167) 2025-02-21 09:22:16 +03:30
Finomnis
a27575f284
signal: fix CTRL_CLOSE, CTRL_LOGOFF, CTRL_SHUTDOWN on windows (#7122) 2025-02-19 12:27:13 +01:00
Stepan Koltsov
13fbdace66
process: add test for Child::kill after Child::wait (#7163) 2025-02-19 00:52:50 +03:30
Timo
4380c3d821
sync: Added WeakSender to sync::broadcast::channel (#7100) 2025-02-17 21:24:29 +01:00
katelyn martin
383da87313
sync: implement oneshot::Receiver::is_empty() (#7153) 2025-02-17 02:01:11 +03:30
katelyn martin
17117b591e
sync: implement oneshot::Receiver::is_terminated() (#7152) 2025-02-16 22:55:50 +03:30
Nathaniel Bajo
aa70f6c5f0
io: add documentation for SyncIoBridge with examples and alternatives (#6815) 2025-02-16 19:01:52 +01:00
Dylan Laufenberg
67c343d9e9
docs: fix nesting of next sections under examples (#7159)
Promote the feature flags and supported platforms sections out from
under examples, as they are not examples. Adjust their subsections
accordingly. Expose these subsections via navigation sidebar.
2025-02-15 23:08:13 +01:00
Oleksandr Babak
34cdcc7d87
macros: docs about select! alternatives (#7110) 2025-02-15 22:49:23 +01:00
Stepan Koltsov
8e134172dd
process: calling start_kill on exited child should not fail (#7160) 2025-02-15 13:48:22 +03:30
M.Amin Rayej
605ef578df
coop: expose coop as a public module (#7116) 2025-02-14 18:56:12 +03:30
M.Amin Rayej
9b578f0c9d
ci: bump freeBSD image version (#7158) 2025-02-14 17:37:16 +03:30
M.Amin Rayej
0a15768380
io: clean up buffer casts (#7142) 2025-02-10 19:57:25 +03:30
Motoyuki Kimura
eb1a2ee990
net: rename the argument for send_to (#7146) 2025-02-08 15:05:05 +03:30
M.Amin Rayej
8713d39228
process: add example for reading Child stdout (#7141) 2025-02-08 13:31:02 +03:30
Florian Gäbler
7e27911911
fs: align symlink and hardlink parameter names with std (#7143) 2025-02-07 23:40:15 +03:30
Alice Ryhl
4b3da20c98
fs: empty reads on File should not start a background read (#7139) 2025-02-06 01:37:29 +03:30
Jason Gin
b8ac94ed70
rt: add before and after task poll callbacks (#7120)
Add callbacks for poll start and stop, enabling users to instrument these points
in the runtime's life cycle.
2025-01-30 21:14:00 +00:00
Oliver Wangler
5086e56dcb
io: implemented get_ref and get_mut for SyncIoBridge (#7128)
Co-authored-by: ow <oliver.wangler@helsing.ai>
2025-01-28 15:28:07 +01:00
Ariel Ben-Yehuda
2671ffb55b
tracing: make the task tracing API unstable piblkc (#6972)
* make self-tracing public

* address review comments

* try to fix doctest

* adjust imports to fit standard

* more documentation

---------

Co-authored-by: Ariel Ben-Yehuda <arielby@amazon.com>
2025-01-27 13:09:23 -08:00
Taiki Endo
7f09959b0a
chore: use [lints] to address unexpected_cfgs lint (#7124) 2025-01-25 17:46:21 +01:00
Taiki Endo
fb7dec0e95
ci: test AArch64/Armv7hf Linux on ubuntu-22.04-arm runner (#7123) 2025-01-25 11:17:37 +01:00
M.Amin Rayej
ee19b0ed73
net: fix warnings when building the docs (#7113) 2025-01-22 11:48:43 +01:00
Josh McKinney
c081dfe3ce
macros: characterization tests for ? operator fail (#7069)
When a `?` operator is used in a tokio entry point function (wrapped in
`#[tokio::main]`), which has a Option or Result return type, but where
the function does not actually return that type correctly, currently the
compiler returns two errors instead of just one. The first of which is
incorrect and only exists due to the macro expanding to an async block.

```
cannot use the `?` operator in an async block that returns `()`
```

This commit is a characterization test for this behavior to help show
when it's fixed (or even changed for better / worse)
2025-01-22 10:55:00 +01:00
M.Amin Rayej
21a13f9eea
runtime: clean up magic number in registration set (#7112) 2025-01-21 14:40:32 +01:00
Motoyuki Kimura
a82bdeebe9
sync: handle panic during mpsc drop (#7094) 2025-01-13 18:36:51 +01:00
Evan Rittenhouse
435e39001b
sync: fix sync::broadcast::Sender<T>::closed() doctest (#7090)
The test's previous iteration could sometimes flake since we didn't
await the completion of the first task. Since the tasks only existed to
`move` the relevant `rx`'s in, to force a drop, we can omit them
entirely and drop the `rx`s via `drop()`. This prevents any
scheduling-related flakes.
2025-01-12 12:33:07 +01:00