pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
    where
        F: FnOnce(&Scope<'env>) -> T,
        F: Send + 'env,
        T: Send + 'env,
    {
        self.builder().spawn(f).unwrap()
    }
/// Create a scoped thread.
///
/// `spawn` is similar to the [`spawn`] function in Rust's standard library. The difference is
/// that this thread is scoped, meaning that it's guaranteed to terminate before the current
/// stack frame goes away, allowing you to reference the parent stack frame directly. This is
/// ensured by having the parent thread join on the child thread before the scope exits.
///
/// [`spawn`]: https://doc.rust-lang.org/std/thread/fn.spawn.html
Create a scoped thread.
`spawn` is similar to the [`spawn`] function in Rust's standard library. The difference is
that this thread is scoped, meaning that it's guaranteed to terminate before the current
stack frame goes away, allowing you to reference the parent stack frame directly. This is
ensured by having the parent thread join on the child thread before the scope exits.


Create a scoped thread . ` spawn ` is similar to the [ ` spawn ` ] function in Rust ' s standard library . The difference is that this thread is scoped meaning that it ' s guaranteed to terminate before the current stack frame goes away allowing you to reference the parent stack frame directly . This is ensured by having the parent thread join on the child thread before the scope exits .
pub fn spawn<'scope, F, T>(&'scope self, f: F) -> ScopedJoinHandle<'scope, T>
    where
        F: FnOnce(&Scope<'env>) -> T,
        F: Send + 'env,
        T: Send + 'env,
    {
        self.builder().spawn(f).unwrap()
    }
pub fn spawn < ' scope , F , T > ( & ' scope self , f : F ) -> ScopedJoinHandle < ' scope , T > where F : FnOnce ( & Scope < ' env > ) -> T , F : Send + ' env , T : Send + ' env , { self . builder ( ) . spawn ( f ) . unwrap ( ) }
Create a scoped thread.
Create a scoped thread .
&'scope self
f
F
&'scope self
f
F