1611 Commits

Author SHA1 Message Date
daxpedda
17cc283f58
macros: accept path as crate rename (#5557) 2023-03-19 12:28:43 +01:00
Alice Ryhl
0a93ed7e7a
io: use memchr from libc (#5558) 2023-03-19 10:49:19 +00:00
Alice Ryhl
cef98e25e7
macros: define cancellation safety (#5525) 2023-03-18 21:25:23 +00:00
Tymoteusz Wiśniewski
e7bd754231
fs: fuse std iterator in ReadDir (#5555)
Implementation of Tokio's ReadDir assumes that ReadDir from std is
fused, but that's not the case on Windows. This change wraps the std
iterator in std::iter::Fuse to make its usage correct.
2023-03-18 14:07:40 +01:00
Austin Bonander
d459a93453
net: add UdpSocket::peek_sender() (#5520) 2023-03-17 10:22:42 +01:00
Shaye Garg
f177aad6e4
task: add JoinHandle::abort_handle (#5543) 2023-03-16 14:02:48 +01:00
Tymoteusz Wiśniewski
4ea632005d
tokio: make all windows docs visible in unix builds (#5530) 2023-03-14 23:33:31 +01:00
Tymoteusz Wiśniewski
89329cd07f
io: add missing AsFd/AsHandle impls (#5540)
* io: add AsFd/AsHandle impls for stdio

* io: add AsFd impl for AsyncFd

* net: add AsHandle impl for named pipe types
2023-03-12 20:01:19 +01:00
Steven Fackler
e34978233b
io: add implementations of AsFd/AsHandle/AsSocket (#5514) 2023-03-11 17:04:01 +01:00
Andrew Halle
8eb94a33c0
time: fix a typo in timeout docs (#5538)
Replace instances of "immediatelly" with "immediately".
2023-03-11 10:40:19 +01:00
amab8901
2b7b1a0494
io: add async_io helper method to sockets (#5512) 2023-03-09 10:12:55 +00:00
Filipe Rodrigues
002f4a28c8
sync: add RwLockWriteGuard::{downgrade_map, try_downgrade_map} (#5527) 2023-03-08 17:06:08 +01:00
Tymoteusz Wiśniewski
ff2f286c12
fs: fix File::from_raw_fd test (#5528) 2023-03-04 11:45:42 +01:00
Aaron Chen
bd4ce68864
process: change "with regards" to "with regard to" in the docs (#5529) 2023-03-04 09:48:29 +00:00
Tymoteusz Wiśniewski
abd92fb27f
net: document usage of ready with stream halves (#5515) 2023-03-03 12:21:29 +01:00
Noah Kennedy
9931901d5c
chore: list 1.25.x as LTS release (#5524) 2023-03-01 23:42:18 +00:00
Noah Kennedy
a377240bbf
chore: prepare for Tokio v1.26.0 release (#5521)
# 1.26.0 (March 1st, 2023)

### Fixed

- macros: fix empty `join!` and `try_join!` ([#5504])
- sync: don't leak tracing spans in mutex guards ([#5469])
- sync: drop wakers after unlocking the mutex in Notify ([#5471])
- sync: drop wakers outside lock in semaphore ([#5475])

### Added

- fs: add `fs::try_exists` ([#4299])
- net: add types for named unix pipes ([#5351])
- sync: add `MappedOwnedMutexGuard` ([#5474])

### Changed

- chore: update windows-sys to 0.45 ([#5386])
- net: use Message Read Mode for named pipes ([#5350])
- sync: mark lock guards with `#[clippy::has_significant_drop]` ([#5422])
- sync: reduce contention in watch channel ([#5464])
- time: remove cache padding in timer entries ([#5468])
- time: Improve `Instant::now()` perf with test-util ([#5513])

### Internal Changes

- io: use `poll_fn` in `copy_bidirectional` ([#5486])
- net: refactor named pipe builders to not use bitfields ([#5477])
- rt: remove Arc from Clock ([#5434])
- sync: make `notify_waiters` calls atomic ([#5458])
- time: don't store deadline twice in sleep entries ([#5410])

### Unstable

- metrics: add a new metric for budget exhaustion yields ([#5517])

### Documented

- io: improve AsyncFd example ([#5481])
- runtime: document the nature of the main future ([#5494])
- runtime: remove extra period in docs ([#5511])
- signal: updated Documentation for Signals ([#5459])
- sync: add doc aliases for `blocking_*` methods ([#5448])
- sync: fix docs for Send/Sync bounds in broadcast ([#5480])
- sync: document drop behavior for channels ([#5497])
- task: clarify what happens to spawned work during runtime shutdown ([#5394])
- task: clarify `process::Command` docs ([#5413])
- task: fix wording with 'unsend' ([#5452])
- time: document immediate completion guarantee for timeouts ([#5509])
- tokio: document supported platforms ([#5483])

[#4299]: https://github.com/tokio-rs/tokio/pull/4299
[#5350]: https://github.com/tokio-rs/tokio/pull/5350
[#5351]: https://github.com/tokio-rs/tokio/pull/5351
[#5386]: https://github.com/tokio-rs/tokio/pull/5386
[#5394]: https://github.com/tokio-rs/tokio/pull/5394
[#5410]: https://github.com/tokio-rs/tokio/pull/5410
[#5413]: https://github.com/tokio-rs/tokio/pull/5413
[#5422]: https://github.com/tokio-rs/tokio/pull/5422
[#5434]: https://github.com/tokio-rs/tokio/pull/5434
[#5448]: https://github.com/tokio-rs/tokio/pull/5448
[#5452]: https://github.com/tokio-rs/tokio/pull/5452
[#5458]: https://github.com/tokio-rs/tokio/pull/5458
[#5459]: https://github.com/tokio-rs/tokio/pull/5459
[#5464]: https://github.com/tokio-rs/tokio/pull/5464
[#5468]: https://github.com/tokio-rs/tokio/pull/5468
[#5469]: https://github.com/tokio-rs/tokio/pull/5469
[#5471]: https://github.com/tokio-rs/tokio/pull/5471
[#5474]: https://github.com/tokio-rs/tokio/pull/5474
[#5475]: https://github.com/tokio-rs/tokio/pull/5475
[#5477]: https://github.com/tokio-rs/tokio/pull/5477
[#5480]: https://github.com/tokio-rs/tokio/pull/5480
[#5481]: https://github.com/tokio-rs/tokio/pull/5481
[#5483]: https://github.com/tokio-rs/tokio/pull/5483
[#5486]: https://github.com/tokio-rs/tokio/pull/5486
[#5494]: https://github.com/tokio-rs/tokio/pull/5494
[#5497]: https://github.com/tokio-rs/tokio/pull/5497
[#5504]: https://github.com/tokio-rs/tokio/pull/5504
[#5509]: https://github.com/tokio-rs/tokio/pull/5509
[#5511]: https://github.com/tokio-rs/tokio/pull/5511
[#5513]: https://github.com/tokio-rs/tokio/pull/5513
[#5517]: https://github.com/tokio-rs/tokio/pull/5517
2023-03-01 22:09:48 +00:00
Noah Kennedy
52da177dea
metrics: add a new metric for budget exhaustion yields (#5517) 2023-03-01 21:25:35 +01:00
Carl Lerche
ee1c940709
time: Improve Instant::now() perf with test-util (#5513)
The test-util feature flag is only intended to be used with tests.
However, it is possible to enable it in release mode accidentally. This
patch reduces the overhead of `Instant::now()` when the `test-util`
feature flag is enabled but `time::pause()` is not called.

The optimization is implemented by adding a static atomic flag that
tracks if `time::pause()` has ever been called. In `Instant::now()`, the
atomic flag is first checked before the thread-local and mutex are
accessed.
2023-02-27 10:21:42 -08:00
Grachev Mikhail
815d89a407
runtime: remove extra period in docs (#5511) 2023-02-27 15:41:17 +01:00
Daria Sukhonina
54aaf3d0e3
time: document immediate completion guarantee for timeouts (#5509) 2023-02-27 14:17:31 +00:00
Tymoteusz Wiśniewski
5a3abe56ee
net: add types for named unix pipes (#5351) 2023-02-27 09:39:07 +01:00
Alice Ryhl
d44b1ca9c8
io: ignore SplitByUtf8BoundaryIfWindows test on miri (#5507)
These tests take a very long time under miri, but the code they're
testing isn't unsafe, so there isn't any reason to run them under miri.
2023-02-26 21:44:44 +00:00
Eric McBride
e23c6f3935
signal: updated Documentation for Signals (#5459) 2023-02-26 19:43:41 +00:00
Alice Ryhl
0a50cb3baa
net: fix test compilation failure (#5506) 2023-02-26 19:06:08 +00:00
Christopher Hunt
2298679af4
runtime: document the nature of the main future (#5494) 2023-02-26 16:48:56 +01:00
Chris Brody
cadcd5da5e
fs: add more tests for filesystem functionality (#5493) 2023-02-26 16:48:09 +01:00
Adrian Heine né Lang
ca9f7ee9f4
macros: fix empty join! and try_join! (#5504)
Fixes: #5502
2023-02-25 18:06:17 +01:00
Hayden Stainsby
c89406965f
sync: document drop behavior for channels (#5497)
Some users mentioned that the behavior of a channel when the receivers
and/or senders are dropped isn't explicitly documented.

This change adds wording to the documentation for each channel in the
sync module, explaining under which conditions messages in a channel are
dropped with respect to dropping the senders and the receivers.

Refs: #5490
2023-02-23 11:04:12 +01:00
Alice Ryhl
d7b7c61317
tokio: document supported platforms (#5483) 2023-02-21 19:57:19 +01:00
Kevin (Kun) "Kassimo" Qian
12f81ffa61
fs: add fs::try_exists (#4299) 2023-02-21 14:15:54 +01:00
Konrad Borowski
fa31cd9990
io: use poll_fn in copy_bidirectional (#5486) 2023-02-20 15:38:40 +01:00
Alice Ryhl
018d0450c7
io: improve AsyncFd example (#5481) 2023-02-19 23:40:56 +01:00
Alice Ryhl
ee09e04c31
sync: drop wakers after unlocking the mutex in Notify (#5471) 2023-02-19 22:16:24 +01:00
Alice Ryhl
2e0372be6f
sync: add MappedOwnedMutexGuard (#5474) 2023-02-19 14:12:32 +01:00
Tymoteusz Wiśniewski
eca24068f7
sync: fix docs for Send/Sync bounds in broadcast (#5480) 2023-02-19 14:11:42 +01:00
Tymoteusz Wiśniewski
795754a846
sync: make notify_waiters calls atomic (#5458) 2023-02-19 14:10:38 +01:00
Maximilian Hils
2e7f996f17
net: refactor named pipe builders to not use bitfields (#5477) 2023-02-19 11:59:28 +01:00
amab8901
901f6d26c6
sync: drop wakers outside lock in semaphore (#5475) 2023-02-19 11:16:59 +01:00
Maximilian Hils
a8fda87058
net: use Message Read Mode for named pipes (#5350) 2023-02-18 20:03:16 +01:00
Alice Ryhl
24aac0add3
sync: don't leak tracing spans in mutex guards (#5469) 2023-02-18 10:39:25 +01:00
Alice Ryhl
b921fe45ac
sync: reduce contention in watch channel (#5464) 2023-02-17 23:56:56 +01:00
Alice Ryhl
0dc1b71e6e
time: remove cache padding in timer entries (#5468) 2023-02-17 22:49:45 +01:00
Alice Ryhl
d19f2f2d39
sync: add doc aliases for blocking_* methods (#5448) 2023-02-17 16:23:57 +01:00
Tim de Jager
28d6f4d509
task: fix wording with 'unsend' (#5452) 2023-02-14 12:44:05 +00:00
Caio
d6dbefcdc0
sync: mark lock guards with #[clippy::has_significant_drop] (#5422) 2023-02-09 11:20:09 +01:00
Conrad Ludgate
d96bbf0465
time: don't store deadline twice in sleep entries (#5410) 2023-02-09 11:19:02 +01:00
Taiki Endo
09b2653e71
chore: update windows-sys to 0.45 (#5386) 2023-02-09 11:16:12 +01:00
Valentin
061325ba7e
task: clarify what happens to spawned work during runtime shutdown (#5394) 2023-02-09 11:14:01 +01:00
Nathaniel Brough
d7d5d05333
tests: port proptest fuzz harnesses to use cargo-fuzz (#5392)
This change ports fuzz tests from the black-box fuzzing framework,
proptest-rs over to use the grey-box fuzzing framework cargo-fuzz.

Refs: #5391
2023-02-09 11:08:50 +01:00