3790 Commits

Author SHA1 Message Date
Maxwell Borden
0a85a9662d
net: implement Clone for NamedPipeInfo (#6586) 2024-05-25 22:14:59 +02:00
Alan Somers
12920cea45
tests: update nix and mio-aio dependencies (#6552)
nix 0.29.0 and mio-aio 0.9.0 use I/O Safety.

Co-authored-by: Frederick Mayle <fmayle@google.com>
2024-05-25 17:30:36 +02:00
Russell Cohen
cba86cf1b1
metrics: add MetricAtomicU64 and use in metrics (#6574) 2024-05-23 18:41:01 +02:00
Roy Wellington
16ef7b1fd5
docs: fix stdin documentation (#6581)
The code for `output` indicates that only sets `stdout` and `stderr`, 
yet the docs for `stdin` indicated that it too would be set. This seems 
like it was just a simple copy/paste typo, so correct `stdin` to note
that it just defaults to `inherit`.

Fixes #6577.
2024-05-23 13:52:57 +09:00
Weijia Jiang
1914e1e4b9
time: use sharding for timer implementation (#6534) 2024-05-22 11:54:26 +00:00
二手掉包工程师
e62c3e9269
task: add tokio::task::join_set::Builder::spawn_blocking (#6578)
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2024-05-22 13:35:12 +02:00
M.Amin Rayej
0b651c070f
fs: add File::create_new (#6573) 2024-05-22 13:24:48 +02:00
Alice Ryhl
a02407171a
task: clarify that you can't abort spawn_blocking tasks (#6571) 2024-05-19 16:09:22 +00:00
Michael Scholten
daa89017da
ci: fix new clippy warnings (#6569) 2024-05-18 10:09:37 +02:00
Alice Ryhl
35c6fd9924
ci: set RUSTUP_WINDOWS_PATH_ADD_BIN=1 (#6568) 2024-05-17 13:03:22 +02:00
Russell Cohen
d221c500fa
docs: gate taskdump compiler_error behind not(doc) (#6564) 2024-05-16 12:14:07 +02:00
John-John Tedro
ced7739f69
tokio: use ptr::addr_of instead of pointer arithmetic in linked_list (#6561) 2024-05-16 10:30:48 +02:00
William Wen
18e048d764
sync: always drop message in destructor for oneshot receiver (#6558) 2024-05-15 13:57:35 +02:00
Weijia Jiang
df77063485
time: remove the true_when field in TimerShared (#6563) 2024-05-15 09:32:39 +02:00
Alice Ryhl
d085260ee0
metrics: fix flaky injection_queue_depth test (#6559) 2024-05-14 21:01:49 +00:00
Sebastian Schildt
227979f091
net: support QNX OS (#6421)
Co-authored-by: Akhil Thankachan Thomas <Akhil.Thomas@in.bosch.com>
2024-05-14 13:11:37 +02:00
Kezhu Wang
6fcd9c0217
macros: make #[tokio::test] append #[test] at the end of the attribute list (#6497) 2024-05-05 16:28:59 +00:00
Alice Ryhl
2a0df5fb05
ci: bump nightly to nightly-2024-05-05 (#6538) 2024-05-05 15:43:11 +00:00
Alice Ryhl
b652a4e64c
util: no default features for hashbrown (#6541) 2024-05-05 17:18:49 +02:00
Alice Ryhl
7f59a6ea85
tests: remove tests module from integration tests (#6540) 2024-05-05 17:18:37 +02:00
Alice Ryhl
75e5b3d96d
runtime: ignore yield_calls_park_before_scheduling_again test (#6537) 2024-05-05 11:06:56 +02:00
Alice Ryhl
cdf9d997dc
chore: prepare tokio-util v0.7.11 (#6535) tokio-util-0.7.11 2024-05-04 22:32:31 +02:00
Weijia Jiang
f6eb1ee196
time: lazily init timers on first poll (#6512) 2024-05-03 15:37:52 +02:00
Matthijs Brobbel
b7d4fba707
sync: add mpsc::Receiver::{capacity,max_capacity} (#6511) 2024-05-03 13:44:01 +02:00
Motoyuki Kimura
3c8d8e60ca
chore: fix latest rust-1.78.0 warnings (#6528) 2024-05-03 11:23:25 +02:00
Paolo Barbolini
e971a5e7d7
util: use FIFO ordering in WakeList (#6521) 2024-05-01 14:19:23 +00:00
Paolo Barbolini
28439e2269
time: clean up implementation (#6517) 2024-05-01 14:50:40 +02:00
João Oliveira
d33fdd86a3
time: check for overflow in Interval::poll_tick (#6487) 2024-04-25 09:02:11 +02:00
Valentin
731dde21dc
runtime: clarify misleading use of UnsafeCell::with_mut (#6513)
The code that we're removing calls UnsafeCell::with_mut with the
argument `std::mem::drop`. This is misleading because the use of `drop`
has no effect. `with_mut` takes an argument of type
`impl FnOnce(*mut T) -> R`. The argument to the argument function is a
pointer. Dropping a pointer has no effect.

The comment above the first instance of this pattern claims that this
releases some resource. This is false because the call has no effect.
The intention might have been to drop the value behind the pointer. If
this did happen, it would be a bug because the resource (`waker`) would
be dropped again at the end of the function when the containing object
is dropped.

I looked through the history of this code. This code originally called
`with_mut` with the argument `|_| ()`. Calling `with_mut` with an
argument function that does nothing has a side effect when testing with
loom. When testing with loom, the code uses loom's UnsafeCell type
instead of std's. The intention of the code was likely to make use of
that side effect because we expect to have exclusive access here as we
are going to drop the containing object. The side effect is that loom
checks that Rust's reference uniqueness properties are upheld.

To continue to check this, I have only removed the use of `drop` while
keeping `with_mut`. It would be even better to have loom check this
implicitly when UnsafeCell is dropped. I created an issue about this in
loom [1].

Links: https://github.com/tokio-rs/loom/issues/349 [1]
2024-04-25 09:01:15 +02:00
LongYinan
9ed595767d
wasm: support rt-multi-thread with wasm32-wasi-preview1-threads (#6510) 2024-04-24 09:45:54 +02:00
avtrujillo
a73d6bf33a
macros: #[cfg(not(test))] is no longer necessary for main macros (#6508) 2024-04-23 14:05:14 +02:00
Alex Yusiuk
8093712604
io: add copy_bidirectional_with_sizes (#6500) 2024-04-22 11:03:33 +02:00
Jainil Patel
19618905de
time: fix test-util requirement for pause and resume in docs (#6503) 2024-04-21 14:12:36 +02:00
Motoyuki Kimura
2438b43671
sync: instrument Semaphore for task dumps (#6499) 2024-04-20 12:35:11 +02:00
Kevin Reid
125a185749
io: fix obsolete reference in ReadHalf::unsplit() documentation (#6498) 2024-04-20 14:21:31 +09:00
Kenny
f3bfed30eb
metrics: document Runtime::metrics (#6496) 2024-04-19 10:07:55 +02:00
Alice Ryhl
5ba12a7145
sync: document that Barrier::wait is not cancel safe (#6494)
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2024-04-18 17:21:34 +02:00
Alice Ryhl
9c6ff3b7e5
sync: explain relation between watch::Sender::{subscribe,closed} (#6490)
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2024-04-17 16:16:14 +02:00
Alice Ryhl
1f6fc55917
net: add missing types to module docs (#6482)
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2024-04-13 17:22:11 +02:00
Josh McKinney
a5bd0deaa5
docs: add --locked to cargo install commands (#6479) 2024-04-13 11:44:33 +02:00
Motoyuki Kimura
ee68c1a8c2
sync: add examples for SemaphorePermit, OwnedSemaphorePermit (#6477) 2024-04-12 13:14:08 +02:00
Alice Ryhl
90e20bcad3
sync: use usize instead of u32 for SemaphorePermit::split (#6478)
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
2024-04-11 17:21:55 +00:00
Alice Ryhl
bdf4c142c9
fs: rewrite file system docs (#6467) 2024-04-11 10:33:51 +02:00
David Tolnay
43de364cd9
readme: mention cargo-docs-rs in CONTRIBUTING.md (#6475) 2024-04-11 10:33:01 +02:00
vvvviiv
224fea4f3c
sync: add split method to the semaphore permit (#6472) 2024-04-10 15:55:44 +02:00
Pierre Fenoll
ccee1d4493
task: make LocalKey::get work with Clone types (#6433)
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
2024-04-10 11:41:58 +02:00
Rafael Bachmann
be9328da75
chore: fix clippy warnings (#6466) 2024-04-08 20:44:18 +09:00
Aoi Kurokawa
b6d74ac4eb
runtime: add links in docs for issues and crates (#6473) 2024-04-08 10:47:57 +02:00
Alice Ryhl
5712aaf995
metrics: ignore worker_steal_count test (#6471) 2024-04-07 16:30:33 +02:00
David Tolnay
431b7c5263
macros: render more comprehensible documentation for select! (#6468) 2024-04-06 22:57:29 +00:00