Skip to content

Conversation

@Keruspe
Copy link
Contributor

@Keruspe Keruspe commented Dec 10, 2025

This introduces tokio::runtime::is_rt_shutdown_err and uses it in pidfd_reaper where it was previously defined.

Fixes #7701

@Keruspe Keruspe marked this pull request as draft December 11, 2025 07:54
This introduces tokio::runtime::is_rt_shutdown_err and uses it in
pidfd_reaper where it was previously defined.

Fixes tokio-rs#7701
@Keruspe Keruspe marked this pull request as ready for review December 11, 2025 08:06
@ADD-SP ADD-SP added A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime labels Dec 11, 2025
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! It looks reasonable.

Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a simple test for this new interface?

@ADD-SP ADD-SP added the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Dec 31, 2025
@Keruspe
Copy link
Contributor Author

Keruspe commented Jan 4, 2026

Sorry, I haven't gotten back on this yet, I might be able to update this this week

@Darksonn
Copy link
Contributor

Darksonn commented Jan 4, 2026

No rush. I was just going through the list of open PRs.

@Keruspe
Copy link
Contributor Author

Keruspe commented Jan 7, 2026

@Darksonn since you added some tests, do you want me to try and iterate on top of that or do you want to finish it up?

@Darksonn
Copy link
Contributor

Darksonn commented Jan 7, 2026

Hrm, it looks like I added tests that don't pass on panic=abort, sorry about that. You can add #[cfg_attr(not(panic="abort"), ignore)] to the relevant tests.

I think this PR is probably fine as-is, unless you have other ideas for additional changes.

disable rustdoc test for wasm (like the other ones around for rt)
disable a test when panic=abort is enabled
@Keruspe Keruspe force-pushed the rt-shutdown-error branch from 2ca0982 to afeee34 Compare January 7, 2026 07:18
@Keruspe
Copy link
Contributor Author

Keruspe commented Jan 7, 2026

Nothing more on my side apart the tests fixing. Should be good now for panic=abort and wasm. Not sure what the problem is for miri if not transient

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@Darksonn Darksonn enabled auto-merge (squash) January 7, 2026 07:36
@Darksonn
Copy link
Contributor

Darksonn commented Jan 7, 2026

For the miri error lets add:

#![cfg(not(miri))] // No socket in miri.

auto-merge was automatically disabled January 7, 2026 08:07

Head branch was pushed to by a user without write access

@Darksonn Darksonn enabled auto-merge (squash) January 7, 2026 08:08
@Darksonn Darksonn merged commit d65165f into tokio-rs:master Jan 7, 2026
88 checks passed
winter-loo pushed a commit to winter-loo/tokio that referenced this pull request Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to check whether the context is being shut down

4 participants