pub fn len(&self) -> usize {
        if let Some(sender) = &self.0 {
            decode_state(sender.inner.state.load(SeqCst)).num_messages
        } else {
            0
        }
    }
Return the number of messages in the queue or 0 if channel is disconnected.
futures-channel/src/mpsc/mod.rs