fn do_exit(&self) -> ApiResponse {
        let d = self.daemon.as_ref();
        d.trigger_exit()
            .map(|_| {
                info!("exit daemon by http request");
                ApiResponsePayload::Empty
            })
            .map_err(|e| {
                error!("exit fuse service failed {:}", e);
                ApiError::DaemonAbnormal(e.into())
            })?;

        // Ensure both fuse and state machine threads have been terminated thus this
        // nydusd won't race fuse messages when upgrading.
        d.wait()
            .map(|_| {
                info!("fuse service exited by http request");
                ApiResponsePayload::Empty
            })
            .map_err(|e| {
                error!("wait for fuse service failed {:}", e);
                ApiError::DaemonAbnormal(e.into())
            })?;

        Ok(ApiResponsePayload::Empty)
    }
/// External supervisor wants this instance to exit without umounting rafs. We can't
/// leave some in-flight fuse messages un-handled. So this method guarantees
/// all fuse messages read from kernel are handled and replies are sent back.
/// Before http response are sent back, this must can ensure that current process
/// has absolutely stopped. Otherwise, multiple processes might read from single
/// fuse session simultaneously.
External supervisor wants this instance to exit without umounting rafs. We can't
leave some in-flight fuse messages un-handled. So this method guarantees
all fuse messages read from kernel are handled and replies are sent back.
Before http response are sent back, this must can ensure that current process
has absolutely stopped. Otherwise, multiple processes might read from single
fuse session simultaneously.
External supervisor wants this instance to exit without umounting rafs . We can ' t leave some in - flight fuse messages un - handled . So this method guarantees all fuse messages read from kernel are handled and replies are sent back . Before http response are sent back this must can ensure that current process has absolutely stopped . Otherwise multiple processes might read from single fuse session simultaneously .
fn do_exit(&self) -> ApiResponse {
        let d = self.daemon.as_ref();
        d.trigger_exit()
            .map(|_| {
                info!("exit daemon by http request");
                ApiResponsePayload::Empty
            })
            .map_err(|e| {
                error!("exit fuse service failed {:}", e);
                ApiError::DaemonAbnormal(e.into())
            })?;
        // Ensure both fuse and state machine threads have been terminated thus this
        // nydusd won't race fuse messages when upgrading.
        d.wait()
            .map(|_| {
                info!("fuse service exited by http request");
                ApiResponsePayload::Empty
            })
            .map_err(|e| {
                error!("wait for fuse service failed {:}", e);
                ApiError::DaemonAbnormal(e.into())
            })?;
        Ok(ApiResponsePayload::Empty)
    }
fn do_exit ( & self ) -> ApiResponse { let d = self . daemon . as_ref ( ) ; d . trigger_exit ( ) . map ( | _ | { info ! ( " " ) ; ApiResponsePayload :: Empty } ) . map_err ( | e | { error ! ( " " e ) ; ApiError :: DaemonAbnormal ( e . into ( ) ) } ) ? ; // Ensure both fuse and state machine threads have been terminated thus this // nydusd won't race fuse messages when upgrading. d . wait ( ) . map ( | _ | { info ! ( " " ) ; ApiResponsePayload :: Empty } ) . map_err ( | e | { error ! ( " " e ) ; ApiError :: DaemonAbnormal ( e . into ( ) ) } ) ? ; Ok ( ApiResponsePayload :: Empty ) }
External supervisor wants this instance to exit without umounting rafs.
External supervisor wants this instance to exit without umounting rafs .
&self
&self