Commit Graph
3870 Commits
Author SHA1 Message Date
Rafael Bachmann 39c3c19bbd macros: improve documentation for select! (#6774) 2024-08-14 15:49:28 +02:00
Eliza Weisman 694577fa85 Add config file to enable Buildomat CI for illumos (#6768)
## Motivation

As described in #6763, Tokio compiles for the [illumos] operating
system, but we don't presently have automated tests on illumos. We would
like to add illumos CI jobs for Tokio using [Buildomat], a CI system
which supports illumos. Buildomat CI jobs for Tokio will run on
infrastructure contributed by Oxide Computer Company.

In order for Buildomat to watch for commits to the repo, we must first
add a configuration file in `.github/buildomat/config.toml` with the
`enable = true` key. This config file must be present on the repo's main
branch for Buildomat to enable builds for the repo. See [here] for
details.

## Solution

This branch adds a `.github/buildomat` directory containing a config
file and a README summarizing what the configs in that directory are
for, as well as documenting how to get help diagnosing illumos CI
failures.


This branch does *not* add scripts for actually running CI jobs on
Buildomat. Since the config file must be present on the repo's main
branch before Buildomat runs CI jobs for the repo, I'd like to merge the
config file separately from the actual build scripts. This way, I can
actually have the build jobs run on the PR that adds them, making it
easier to ensure everything is working correctly before merging.

Closes #6766, which is obsoleted by this branch.

[illumos]: https://www.illumos.org/
[Buildomat]: https://github.com/oxidecomputer/
[here]:
    https://github.com/oxidecomputer/buildomat/blob/main/README.md#per-repository-configuration
2024-08-12 16:22:21 +00:00
Vrtgs 17819062e2 tokio: update code according to new MSRV (#6764) 2024-08-11 11:55:22 +02:00
Sainath Singineedi 6ad1912353 task: add #[must_use] to JoinHandle::abort_handle (#6762) 2024-08-09 20:57:31 +00:00
Caleb Leinz (he/him) a491b16a89 sync: add {TrySendError,SendTimeoutError}::into_inner (#6755) 2024-08-08 00:06:37 +02:00
Austin Bonander 0ecf5f0f03 task: include panic msg when printing JoinError (#6753) 2024-08-07 16:54:02 +02:00
Adam Cigánek 1e798d26ed time: wake DelayQueue when removing last item (#6752) 2024-08-06 16:22:31 +02:00
Alice Ryhl ab53bf0c47 runtime: prevent niche-optimization to avoid triggering miri (#6744) 2024-08-03 12:32:50 +02:00
Motoyuki Kimura 338e13b04b task: use NonZeroU64 for task::Id (#6733) 2024-08-01 14:45:35 +00:00
Motoyuki Kimura 1077b0b29d io: use vectored io for write_all_buf when possible (#6724) 2024-07-29 19:39:44 +02:00
Hayden Stainsby 0cbf1a5ada time,sync: make Sleep and BatchSemaphore instrumentation explicit roots (#6727)
When instrumenting resources in Tokio, a span is created for each
resource. Previously, all resources inherited the currently active span
as their parent (tracing default). However, this would keep that parent
span alive until the resource (and its span) were dropped. This is often
not correct, as a resource may be created in a task and then sent
elsewhere, while the originating task ends.

This artificial extension of the parent span's lifetime would make it
look like that task was still alive (but idle) in any system reading the
tracing instrumentation in Tokio, for example Tokio Console as reported
in tokio-rs/console#345.

In #6107, most of the existing resource spans were updated to
make them explicit roots, so they have no contextual parent. However,
2. were missed:
- `Sleep`
- `BatchSemaphore`

This change alters the resource spans for those 2 resources to also make
them explicit roots.
2024-07-29 12:06:13 +02:00
Hayden Stainsby 04c2718508 docs: reiterate that [build] doesn't go in Cargo.toml (#6728)
To enable unstable features in Tokio, passing `--cfg tokio_unstable` to
the compiler is necessary. We document how to do this in a variety of
ways in the main Tokio (lib.rs) documentation.

One way is to add a `[build]` section to the file `.cargo/config.toml`.
Even though this filename is stated in the documentation, it is quite
common that first time users (including this author, some time ago) put
it in their `Cargo.toml` file instead.

This change adds a "warning" section to the documentation to reiterate
the point that this section doesn't go in the cargo manifest
(`Cargo.toml`).
2024-07-29 11:23:29 +02:00
Niklas Fiekas ebda4c3d3f process: stabilize Command::process_group (#6731) 2024-07-27 23:08:40 +02:00
Alice Ryhl f602eae499 chore: prepare Tokio v1.39.2 (#6730) tokio-1.39.2 2024-07-27 12:36:48 +02:00
Alice Ryhl 438def7957 macros: allow temporary lifetime extension in select (#6722) 2024-07-26 17:36:28 +01:00
Motoyuki Kimura ee8d4d1b05 chore: fix ci failures (#6725) 2024-07-25 20:30:23 +02:00
Dirkjan Ochtman 3297052763 ci: test Quinn in CI (#6719) 2024-07-25 11:37:46 +02:00
Alice Ryhl f8fe0ffb23 chore: prepare Tokio v1.39.1 (#6716) tokio-1.39.1 2024-07-23 18:28:04 +02:00
Alice Ryhl 47210a8e6e time: revert "avoid traversing entries in the time wheel twice" (#6715)
This reverts commit 8480a180e6.
2024-07-23 16:09:28 +00:00
Alice Ryhl 29545d9037 runtime: ignore many_oneshot_futures test for alt scheduler (#6712) 2024-07-23 16:35:20 +02:00
Alice Ryhl 48e35c11d9 chore: release Tokio v1.39.0 (#6711) tokio-1.39.0 2024-07-23 15:30:11 +02:00
Alice Ryhl dd1d37167d macros: accept IntoFuture args for macros (#6710) 2024-07-23 12:52:25 +00:00
Alice Ryhl 6a1a7b1591 chore: prepare tokio-macros v2.4.0 (#6707) tokio-macros-2.4.0 2024-07-23 14:45:06 +02:00
Kenny Kerr 51b03f0334 deps: update to windows-sys v0.52 (#6154) 2024-07-23 14:43:23 +02:00
Thomas de Zeeuw 754a1fb03c deps: update to Mio v1 (#6635) 2024-07-23 14:26:07 +02:00
Sebastian Urban 90b23a9584 metrics: add worker thread id (#6695) 2024-07-23 12:41:33 +02:00
Sebastian Urban b69f16aa21 metrics: add worker_park_unpark_count (#6696) 2024-07-23 09:15:54 +02:00
Alex Butler 6e845b794d time: support IntoFuture with timeout (#6666) 2024-07-22 23:29:18 +02:00
Tim Vilgot Mikael Fredenberg feb742c58e chore: replace num_cpus with available_parallelism (#6709) 2024-07-22 23:15:23 +02:00
Alice Ryhl 15cd5146d4 chore: increase MSRV to 1.70 (#6645) 2024-07-22 18:01:27 +00:00
Alice Ryhl 56f4bc6543 chore: make 1.38 an LTS (#6706) 2024-07-21 18:28:12 +02:00
Motoyuki Kimura 3ad5b6df1a runtime: add cfg for loom specific code (#6694) 2024-07-21 17:26:36 +02:00
Russell Cohen 1be8a8e691 metrics: stabilize num_alive_tasks (#6619) 2024-07-18 22:08:29 +02:00
Motoyuki Kimura da17c61464 task: add size check for user-supplied future (#6692) 2024-07-18 11:54:37 +00:00
Ikko Eltociear Ashimine f71bded943 sync: fix typo in name of test (#6693) 2024-07-18 11:05:16 +02:00
Motoyuki Kimura fc058b9561 io: update tokio::io::stdout documentation (#6674) 2024-07-16 19:34:09 +02:00
wathenjiang c0280624f3 Merge 'tokio-1.38.1' into 'master' (#6689) 2024-07-17 00:02:27 +08:00
Evan Rittenhouse 1e286689ff runtime: fix yield_calls_park_before_scheduling_again test (#6679) 2024-07-16 17:29:19 +02:00
Weijia Jiang 14b9f71157 chore: release Tokio v1.38.1 (#6688) tokio-1.38.1 2024-07-16 17:16:29 +02:00
Weijia Jiang 24344dfe4b time: fix race condition leading to lost timers (#6683) 2024-07-16 13:25:59 +00:00
Paolo Barbolini 15925efe43 macros: fix doc format issue (#6686) 2024-07-16 12:13:41 +02:00
Matthew Leach 4825c444eb test: fix tests when '-' is absent from kernel version (#6681)
On my machine, any test that calls `is_pidfd_available` fails as my
kernel string does not contain a '-'; the code expects there to be one.

Fix the test so that is works regardless on whether the kernel string
contains a '-'.
2024-07-14 13:38:23 +09:00
sharpened-nacho c8f3539bc1 stream: make stream adapters public (#6658) 2024-07-02 20:49:34 +00:00
Alice Ryhl b2e4c5fc9e io: hardcode platform list in short-read optimization (#6668) 2024-07-02 20:25:49 +00:00
teor 4d0d89fb70 task: document behavior of JoinSet::try_join_next when all tasks are running (#6671) 2024-07-02 17:54:59 +02:00
二手掉包工程师 fe7285d3d1 sync: add {Receiver,UnboundedReceiver}::{sender_strong_count,sender_weak_count} (#6661) 2024-07-02 23:41:15 +08:00
Michael MaciasandWeijia Jiang dff4ecd0e7 io: implement AsyncSeek for Empty (#6663)
* io: implement `AsyncSeek` for `Empty`

* io: add more tests for seeking `Empty`

This adds more tests seeking with other kinds of `SeekFrom`. It follows
the same structure as used in
rust-lang/rust@f1cd17961c.

See <https://github.com/tokio-rs/tokio/pull/6663#discussion_r1659491016>.

* io: add inline attribute to `AsyncSeek` implementations

This follows the style of the other trait implementations of `Empty`.

See <https://github.com/tokio-rs/tokio/pull/6663#discussion_r1658835942>.

---------

Co-authored-by: Weijia Jiang <[email protected]>
2024-07-01 09:50:49 +08:00
Alice Ryhl 68d0e3cb5f metrics: rename num_active_tasks to num_alive_tasks (#6667) 2024-06-30 15:02:29 +02:00
Tobias Nießen 65d0e08d39 runtime: fix typo in unhandled_panic (#6660) 2024-06-28 01:10:14 +09:00
Hai-Hsin 06582776a5 codec: fix length_delimited docs examples (#6638) 2024-06-23 13:52:51 +09:00