Skip to main content

spawn_scoped_os_thread

Function spawn_scoped_os_thread 

Source
pub fn spawn_scoped_os_thread<'scope, 'env, F, T>(
    scope: &'scope Scope<'scope, 'env>,
    name: &str,
    f: F,
) -> ScopedJoinHandle<'scope, T>
where F: FnOnce() -> T + Send + 'scope, T: Send + 'scope,
Available on crate feature tasks only.
Expand description

Spawns a scoped OS thread with the current tokio runtime context propagated.

This is the scoped thread version of spawn_os_thread, for use with std::thread::scope.