pub(crate) async fn stop(immediate_start: bool) -> String {
        let notify = {
            let mut output = GLOBAL_OUT.lock().unwrap();
            let output = output.as_mut().unwrap();
            let notify = Arc::new(Notify::new());
            output.send(Message::Stop(notify.clone())).unwrap();
            if immediate_start {
                output.send(Message::Start).unwrap();
            }
            notify
        };
        notify.notified().await;
        let mut result_lock = LAST_TRACING_RESULT.lock().unwrap();
        result_lock.take().unwrap()
    }
/// Stops the active tracing and returns the result of the tracing.
Stops the active tracing and returns the result of the tracing.
Stops the active tracing and returns the result of the tracing .
pub(crate) async fn stop(immediate_start: bool) -> String {
        let notify = {
            let mut output = GLOBAL_OUT.lock().unwrap();
            let output = output.as_mut().unwrap();
            let notify = Arc::new(Notify::new());
            output.send(Message::Stop(notify.clone())).unwrap();
            if immediate_start {
                output.send(Message::Start).unwrap();
            }
            notify
        };
        notify.notified().await;
        let mut result_lock = LAST_TRACING_RESULT.lock().unwrap();
        result_lock.take().unwrap()
    }
pub ( crate ) async fn stop ( immediate_start : bool ) -> String { let notify = { let mut output = GLOBAL_OUT . lock ( ) . unwrap ( ) ; let output = output . as_mut ( ) . unwrap ( ) ; let notify = Arc :: new ( Notify :: new ( ) ) ; output . send ( Message :: Stop ( notify . clone ( ) ) ) . unwrap ( ) ; if immediate_start { output . send ( Message :: Start ) . unwrap ( ) ; } notify } ; notify . notified ( ) . await ; let mut result_lock = LAST_TRACING_RESULT . lock ( ) . unwrap ( ) ; result_lock . take ( ) . unwrap ( ) }
Stops the active tracing and returns the result of the tracing.
Stops the active tracing and returns the result of the tracing .
immediate_start
bool
immediate_start
bool