pub async fn sync(&self, send_to_file: bool) -> Result<()> {
        let (tx, rx) = oneshot::channel::<bool>();
        self.send(Command::Sync(tx))?;

        if send_to_file {
            let (tx, rx) = oneshot::channel::<bool>();
            self.tx_file.send(Command::Sync(tx))?;
            rx.await?;
        }

        rx.await?;
        Ok(())
    }
/// Sync the handle with the handler
Sync the handle with the handler
Sync the handle with the handler
pub async fn sync(&self, send_to_file: bool) -> Result<()> {
        let (tx, rx) = oneshot::channel::<bool>();
        self.send(Command::Sync(tx))?;
        if send_to_file {
            let (tx, rx) = oneshot::channel::<bool>();
            self.tx_file.send(Command::Sync(tx))?;
            rx.await?;
        }
        rx.await?;
        Ok(())
    }
pub async fn sync ( & self , send_to_file : bool ) -> Result < ( ) > { let ( tx , rx ) = oneshot :: channel :: < bool > ( ) ; self . send ( Command :: Sync ( tx ) ) ? ; if send_to_file { let ( tx , rx ) = oneshot :: channel :: < bool > ( ) ; self . tx_file . send ( Command :: Sync ( tx ) ) ? ; rx . await ? ; } rx . await ? ; Ok ( ( ) ) }
Sync the handle with the handler
Sync the handle with the handler
&self
send_to_file
bool