diff --git a/tokio/src/sync/mpsc/chan.rs b/tokio/src/sync/mpsc/chan.rs index 001f4b13df5..e7b951ed733 100644 --- a/tokio/src/sync/mpsc/chan.rs +++ b/tokio/src/sync/mpsc/chan.rs @@ -136,6 +136,13 @@ impl Tx { self.inner.send(value); } + /// Wake the receive half + pub(crate) fn wake_rx(&self) { + self.inner.rx_waker.wake(); + } +} + +impl Tx { pub(crate) async fn closed(&mut self) { use std::future::Future; use std::pin::Pin; @@ -162,11 +169,6 @@ impl Tx { } notified.await; } - - /// Wake the receive half - pub(crate) fn wake_rx(&self) { - self.inner.rx_waker.wake(); - } } impl Clone for Tx {