Function subspace_farmer::utils::run_future_in_dedicated_thread

source ยท
pub fn run_future_in_dedicated_thread<CreateFut, Fut, T>(
    create_future: CreateFut,
    thread_name: String,
) -> Result<impl Future<Output = Result<T, Canceled>> + Send>
where CreateFut: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = T> + 'static, T: Send + 'static,
Expand description

Runs future on a dedicated thread with the specified name, will block on drop until background thread with future is stopped too, ensuring nothing is left in memory