mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
981f837e2d
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: https://github.com/rust-lang/libs-team/issues/748 Tracking issue: https://github.com/rust-lang/rust/issues/153668