spawn_abortable

Function spawn_abortable 

Source
pub fn spawn_abortable<F>(future: F) -> AbortableJoinHandle<F::Output> 
where F: Future + Send + 'static, F::Output: Send + 'static,
Expand description

Spawns a new asynchronous task in the background, returning an abortable handle that will cancel the task once the handle is dropped.

Note: This function is used if the task is expected to run until the handle is dropped. It is recommended to use spawn or dispatch otherwise.