Uh oh!
There was an error while loading. Please reload this page.
Add is_disconnected functions to mpsc and mpmc channels - #153170
Conversation
rustbot
commented
Feb 27, 2026
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
@rustbot label +S-waiting-on-ACP |
This comment has been minimized.
This comment has been minimized.
c952a5b to
7adb9baCompare
I added the following text to the documentation: /// Note that a return value of `false` does not guarantee the channel will/// remain connected. The channel may be disconnected immediately after this method/// returns, so a subsequent [`Sender::send`] may still fail with [`SendError`].and subsequent versions for |
@rustbot label +S-waiting-on-review -S-waiting-on-ACP |
LevitatingBusinessMan
commented
Mar 10, 2026
Currently I've put the methods for mpmc behind |
Mark-Simulacrum
commented
Mar 19, 2026
@bors r+ rollup I think it seems reasonable either way but this setup seems fine for the feature gate. |
…ted, r=Mark-Simulacrum Add is_disconnected functions to mpsc and mpmc channels Add `is_disconnected()` functions to the `Sender` and `Receiver` of both `mpmc` an `mpsc` channels. ```rust std::sync::mpmc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpmc::Receiver<T>::is_disconnected(&self) -> bool std::sync::mpsc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpsc::Receiver<T>::is_disconnected(&self) -> bool ``` The `mpsc` methods are locked behind the `mpsc_is_disconnected` feature gate, which has no tracking issue yet. ACP: rust-lang/libs-team#748 Tracking issue: rust-lang#153668
…ted, r=Mark-Simulacrum Add is_disconnected functions to mpsc and mpmc channels Add `is_disconnected()` functions to the `Sender` and `Receiver` of both `mpmc` an `mpsc` channels. ```rust std::sync::mpmc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpmc::Receiver<T>::is_disconnected(&self) -> bool std::sync::mpsc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpsc::Receiver<T>::is_disconnected(&self) -> bool ``` The `mpsc` methods are locked behind the `mpsc_is_disconnected` feature gate, which has no tracking issue yet. ACP: rust-lang/libs-team#748 Tracking issue: rust-lang#153668
…ted, r=Mark-Simulacrum Add is_disconnected functions to mpsc and mpmc channels Add `is_disconnected()` functions to the `Sender` and `Receiver` of both `mpmc` an `mpsc` channels. ```rust std::sync::mpmc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpmc::Receiver<T>::is_disconnected(&self) -> bool std::sync::mpsc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpsc::Receiver<T>::is_disconnected(&self) -> bool ``` The `mpsc` methods are locked behind the `mpsc_is_disconnected` feature gate, which has no tracking issue yet. ACP: rust-lang/libs-team#748 Tracking issue: rust-lang#153668
…uwer Rollup of 12 pull requests Successful merges: - #152870 (Do not enable split debuginfo for windows-gnu) - #153333 (Fix bootstrap rust build failure for vxworks) - #153681 (ci: add runners for vanilla LLVM 22) - #153824 (Add `Wake` diagnostic item for `alloc::task::Wake`) - #154077 (Optimize 128-bit integer formatting) - #154078 (`define_callbacks` tweaks) - #151905 (Split the `dec2flt::RawFloat` trait for easier reuse) - #153170 (Add is_disconnected functions to mpsc and mpmc channels) - #153804 (Derive Macro Eq: link to more detailed documentation) - #153974 (Point at return type when it is the source of the type expectation) - #154018 (simplify and remove `tests/ui/kindck` and related tests) - #154041 (bootstrap: Allow `--bless`ing changes to editor settings files)
…ted, r=Mark-Simulacrum Add is_disconnected functions to mpsc and mpmc channels Add `is_disconnected()` functions to the `Sender` and `Receiver` of both `mpmc` an `mpsc` channels. ```rust std::sync::mpmc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpmc::Receiver<T>::is_disconnected(&self) -> bool std::sync::mpsc::Sender<T>::is_disconnected(&self) -> bool std::sync::mpsc::Receiver<T>::is_disconnected(&self) -> bool ``` The `mpsc` methods are locked behind the `mpsc_is_disconnected` feature gate, which has no tracking issue yet. ACP: rust-lang/libs-team#748 Tracking issue: rust-lang#153668
…uwer Rollup of 19 pull requests Successful merges: - #152870 (Do not enable split debuginfo for windows-gnu) - #153333 (Fix bootstrap rust build failure for vxworks) - #153681 (ci: add runners for vanilla LLVM 22) - #153727 (When single impl can satisfy inference error, suggest type) - #153824 (Add `Wake` diagnostic item for `alloc::task::Wake`) - #154077 (Optimize 128-bit integer formatting) - #154078 (`define_callbacks` tweaks) - #151905 (Split the `dec2flt::RawFloat` trait for easier reuse) - #153170 (Add is_disconnected functions to mpsc and mpmc channels) - #153308 (Add hygiene annotations for tokens in `macro_rules!` bodies) - #153557 (fix inference variables leaking into HIR const literal lowering logic) - #153804 (Derive Macro Eq: link to more detailed documentation) - #153913 (Fix some suggestions of the `for-loops-over-fallibles` lint) - #153974 (Point at return type when it is the source of the type expectation) - #153987 (mGCA: Lower const generic args to infer when needed) - #154018 (simplify and remove `tests/ui/kindck` and related tests) - #154036 (borrowck/type_check: remove helper left-over from unsized locals) - #154038 (merge `regions-outlives-nominal-type-*` tests into one file) - #154041 (bootstrap: Allow `--bless`ing changes to editor settings files)
…uwer Rollup of 19 pull requests Successful merges: - #152870 (Do not enable split debuginfo for windows-gnu) - #153333 (Fix bootstrap rust build failure for vxworks) - #153681 (ci: add runners for vanilla LLVM 22) - #153727 (When single impl can satisfy inference error, suggest type) - #153824 (Add `Wake` diagnostic item for `alloc::task::Wake`) - #154077 (Optimize 128-bit integer formatting) - #154078 (`define_callbacks` tweaks) - #151905 (Split the `dec2flt::RawFloat` trait for easier reuse) - #153170 (Add is_disconnected functions to mpsc and mpmc channels) - #153308 (Add hygiene annotations for tokens in `macro_rules!` bodies) - #153557 (fix inference variables leaking into HIR const literal lowering logic) - #153804 (Derive Macro Eq: link to more detailed documentation) - #153913 (Fix some suggestions of the `for-loops-over-fallibles` lint) - #153974 (Point at return type when it is the source of the type expectation) - #153987 (mGCA: Lower const generic args to infer when needed) - #154018 (simplify and remove `tests/ui/kindck` and related tests) - #154036 (borrowck/type_check: remove helper left-over from unsized locals) - #154038 (merge `regions-outlives-nominal-type-*` tests into one file) - #154041 (bootstrap: Allow `--bless`ing changes to editor settings files)
Uh oh!
There was an error while loading. Please reload this page.
Add
is_disconnected()functions to theSenderandReceiverof bothmpmcanmpscchannels.The
mpscmethods are locked behind thempsc_is_disconnectedfeature gate, which has no tracking issue yet.ACP: rust-lang/libs-team#748
Tracking issue: #153668