clementine_core::utils

Function monitor_task_with_panic

Source
pub fn monitor_task_with_panic<T: Send + 'static, E: Debug + Send + 'static>(
    task_handle: JoinHandle<Result<T, E>>,
    task_name: &str,
)
Expand description

Monitors a JoinHandle and aborts the process if the task completes with an error. Returns a handle to the monitoring task that can be used to cancel it.