pub async fn flush(&mut self) -> Result<(), Error> {
        if self.task.is_terminated() {
            return Err(Error::Shutdown);
        }

        let mut shared = self.shared.lock().await;
        if let Some(send_ready) = shared.send_ready.take() {
            send_ready.wake();
        }
        Ok(())
    }
/// Ensure that any previously written data is sent in a timely manner.
///
/// Returns once the sending task has been notified to wake up and will send the written data
/// promptly.  Does *not* actually wait for outgoing packets to be sent before returning.
Ensure that any previously written data is sent in a timely manner.
Returns once the sending task has been notified to wake up and will send the written data
promptly.  Does *not* actually wait for outgoing packets to be sent before returning.
Ensure that any previously written data is sent in a timely manner . Returns once the sending task has been notified to wake up and will send the written data promptly . Does * not * actually wait for outgoing packets to be sent before returning .
pub async fn flush(&mut self) -> Result<(), Error> {
        if self.task.is_terminated() {
            return Err(Error::Shutdown);
        }
        let mut shared = self.shared.lock().await;
        if let Some(send_ready) = shared.send_ready.take() {
            send_ready.wake();
        }
        Ok(())
    }
pub async fn flush ( & mut self ) -> Result < ( ) , Error > { if self . task . is_terminated ( ) { return Err ( Error :: Shutdown ) ; } let mut shared = self . shared . lock ( ) . await ; if let Some ( send_ready ) = shared . send_ready . take ( ) { send_ready . wake ( ) ; } Ok ( ( ) ) }
Ensure that any previously written data is sent in a timely manner.
Ensure that any previously written data is sent in a timely manner .
&mut self
&mut self