3955 Commits

Author SHA1 Message Date
Armillus
3f397ccded
io: read during write in copy_bidirectional and copy (#6532) 2024-06-05 00:29:28 +02:00
Emil Loer
49609d073f
test: make Spawn forward size_hint (#6607) 2024-06-04 23:42:42 +02:00
Alan Somers
a91d43823c
ci: update FreeBSD CI environment (#6616)
Use the newly released FreeBSD 14.1.
2024-06-04 23:37:13 +02:00
Timo
8fca6f6dad
process: add Command::as_std_mut (#6608) 2024-06-04 13:34:22 +02:00
Weijia Jiang
75c953bd63
time: fix big time panic issue (#6612) 2024-06-04 09:45:35 +02:00
Alice Ryhl
14c17fc096
chore: prepare Tokio v1.38.0 (#6601) tokio-1.38.0 2024-05-30 13:24:58 -07:00
Alice Ryhl
65cbf730de
chore: prepare tokio-macros v2.3.0 (#6600) tokio-macros-2.3.0 2024-05-30 13:21:51 -07:00
Alice Ryhl
dbf93c7184
sync: fix incorrect is_empty on mpsc block boundaries (#6603) 2024-05-30 13:21:16 -07:00
Weijia Jiang
873cb8ae2f
runtime: move task out of the lifo_slot in block_in_place (#6596) 2024-05-30 10:45:45 +02:00
SteveLauC
97bb47b480
task: fix a typo in doc of LocalSet::run_until (#6599) 2024-05-30 10:44:53 +02:00
Russell Cohen
86658bd87d
metrics: stabilize RuntimeMetrics::worker_count (#6556) 2024-05-28 21:55:20 +02:00
Pau Freixes
9e00b266e0
sync: add Notify::notify_last (#6520) 2024-05-27 11:18:34 +00:00
Maxwell Borden
6c42d286b3
net: fix misleading NamedPipeServer example (#6590)
The previous NamedPipeServer doc example seemed to imply that the return
type of `NamedPipeServer::connect()` was a
`Future<Result<some_kind_of_client>>>`, however, `connect()` returns a
`Future<Result<()>>>`. The following line of code reopening the pipe
would shadow the newly connected pipe immediately, making the following
spawned task pointless. Hopefully these changes make it more clear what
should be happening in the example.
2024-05-26 12:25:19 +02:00
Josh McKinney
3a6fdc0568
license: fix formatting and remove year in licenses (#6451) 2024-05-26 09:29:27 +00:00
Conrad Ludgate
2890d0c3db
metrics: fix blocking_threads count (#6551) 2024-05-25 21:49:17 +00:00
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