rt: make is_rt_shutdown_err method public#7771
Conversation
5f26c8f to
640c000
Compare
This introduces tokio::runtime::is_rt_shutdown_err and uses it in pidfd_reaper where it was previously defined. Fixes tokio-rs#7701
640c000 to
0ca69e7
Compare
Darksonn
left a comment
There was a problem hiding this comment.
Thanks for the PR! It looks reasonable.
Co-authored-by: Alice Ryhl <[email protected]>
ADD-SP
left a comment
There was a problem hiding this comment.
Could you add a simple test for this new interface?
|
Sorry, I haven't gotten back on this yet, I might be able to update this this week |
|
No rush. I was just going through the list of open PRs. |
|
@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? |
|
Hrm, it looks like I added tests that don't pass on 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
2ca0982 to
afeee34
Compare
|
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 |
|
For the miri error lets add: |
Head branch was pushed to by a user without write access
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | dependencies | minor | `1.49.0` → `1.50.0` | --- ### Release Notes <details> <summary>tokio-rs/tokio (tokio)</summary> ### [`v1.50.0`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.50.0): Tokio v1.50.0 [Compare Source](tokio-rs/tokio@tokio-1.49.0...tokio-1.50.0) ### 1.50.0 (Mar 3rd, 2026) ##### Added - net: add `TcpStream::set_zero_linger` ([#​7837]) - rt: add `is_rt_shutdown_err` ([#​7771]) ##### Changed - io: add optimizer hint that `memchr` returns in-bounds pointer ([#​7792]) - io: implement vectored writes for `write_buf` ([#​7871]) - runtime: panic when `event_interval` is set to 0 ([#​7838]) - runtime: shorten default thread name to fit in Linux limit ([#​7880]) - signal: remember the result of `SetConsoleCtrlHandler` ([#​7833]) - signal: specialize windows `Registry` ([#​7885]) ##### Fixed - io: always cleanup `AsyncFd` registration list on deregister ([#​7773]) - macros: remove (most) local `use` declarations in `tokio::select!` ([#​7929]) - net: fix `GET_BUF_SIZE` constant for `target_os = "android"` ([#​7889]) - runtime: avoid redundant unpark in current\_thread scheduler ([#​7834]) - runtime: don't park in `current_thread` if `before_park` defers waker ([#​7835]) - io: fix write readiness on ESP32 on short writes ([#​7872]) - runtime: wake deferred tasks before entering `block_in_place` ([#​7879]) - sync: drop rx waker when oneshot receiver is dropped ([#​7886]) - runtime: fix double increment of `num_idle_threads` on shutdown ([#​7910], [#​7918], [#​7922]) ##### Unstable - fs: check for io-uring opcode support ([#​7815]) - runtime: avoid lock acquisition after uring init ([#​7850]) ##### Documented - docs: update outdated unstable features section ([#​7839]) - io: clarify the behavior of `AsyncWriteExt::shutdown()` ([#​7908]) - io: explain how to flush stdout/stderr ([#​7904]) - io: fix incorrect and confusing `AsyncWrite` documentation ([#​7875]) - rt: clarify the documentation of `Runtime::spawn` ([#​7803]) - rt: fix missing quotation in docs ([#​7925]) - runtime: correct the default thread name in docs ([#​7896]) - runtime: fix `event_interval` doc ([#​7932]) - sync: clarify RwLock fairness documentation ([#​7919]) - sync: clarify that `recv` returns `None` once closed and no more messages ([#​7920]) - task: clarify when to use `spawn_blocking` vs dedicated threads ([#​7923]) - task: doc that task drops before `JoinHandle` completion ([#​7825]) - signal: guarantee that listeners never return `None` ([#​7869]) - task: fix task module feature flags in docs ([#​7891]) - task: fix two typos ([#​7913]) - task: improve the docs of `Builder::spawn_local` ([#​7828]) - time: add docs about auto-advance and when to use sleep ([#​7858]) - util: fix typo in docs ([#​7926]) [#​7771]: tokio-rs/tokio#7771 [#​7773]: tokio-rs/tokio#7773 [#​7792]: tokio-rs/tokio#7792 [#​7803]: tokio-rs/tokio#7803 [#​7815]: tokio-rs/tokio#7815 [#​7825]: tokio-rs/tokio#7825 [#​7828]: tokio-rs/tokio#7828 [#​7833]: tokio-rs/tokio#7833 [#​7834]: tokio-rs/tokio#7834 [#​7835]: tokio-rs/tokio#7835 [#​7837]: tokio-rs/tokio#7837 [#​7838]: tokio-rs/tokio#7838 [#​7839]: tokio-rs/tokio#7839 [#​7850]: tokio-rs/tokio#7850 [#​7858]: tokio-rs/tokio#7858 [#​7869]: tokio-rs/tokio#7869 [#​7871]: tokio-rs/tokio#7871 [#​7872]: tokio-rs/tokio#7872 [#​7875]: tokio-rs/tokio#7875 [#​7879]: tokio-rs/tokio#7879 [#​7880]: tokio-rs/tokio#7880 [#​7885]: tokio-rs/tokio#7885 [#​7886]: tokio-rs/tokio#7886 [#​7889]: tokio-rs/tokio#7889 [#​7891]: tokio-rs/tokio#7891 [#​7896]: tokio-rs/tokio#7896 [#​7904]: tokio-rs/tokio#7904 [#​7908]: tokio-rs/tokio#7908 [#​7910]: tokio-rs/tokio#7910 [#​7913]: tokio-rs/tokio#7913 [#​7918]: tokio-rs/tokio#7918 [#​7919]: tokio-rs/tokio#7919 [#​7920]: tokio-rs/tokio#7920 [#​7922]: tokio-rs/tokio#7922 [#​7923]: tokio-rs/tokio#7923 [#​7925]: tokio-rs/tokio#7925 [#​7926]: tokio-rs/tokio#7926 [#​7929]: tokio-rs/tokio#7929 [#​7932]: tokio-rs/tokio#7932 </details> --- ### Configuration 📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) in timezone Pacific/Auckland, Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) in timezone Pacific/Auckland. 🚦 **Automerge**: Disabled because a matching PR was automerged previously. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41Mi4xIiwidXBkYXRlZEluVmVyIjoiNDMuNTIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUiXX0=--> Reviewed-on: https://harton.dev/project-neon/neonfs/pulls/53 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
This introduces
tokio::runtime::is_rt_shutdown_errand uses it in pidfd_reaper where it was previously defined.Fixes #7701