pub fn spawn_local<F, T>(&self, future: F) -> JoinHandle<T>
    where
        F: Future<Output = T> + 'static,
        T: Send + 'static,
    {
        let inner = match &self.inner {
            #[cfg(feature = "tokio_executor")]
            TokioHandle => {
                JoinHandleInner::<T>::Tokio(Some(tokio::task::spawn_local(future)))
            },
            #[cfg(feature = "async_std_executor")]
            AsyncStdHandle => {
                JoinHandleInner::<T>::AsyncStd(Some(async_std::task::spawn_local(future)))
            },
            #[cfg(feature = "smol_executor")]
            SmolHandle(executor) => {
                JoinHandleInner::<T>::Smol(Some(executor.spawn(future)))
            },
            #[cfg(feature = "futures_executor")]
            FuturesHandle(executor) => {
                use futures::future::FutureExt;
                let (future, handle) = future.remote_handle();
                executor.spawn_local(future).expect("Local spawn error");
                JoinHandleInner::<T>::RemoteHandle(Some(handle))
            },
            #[cfg(feature = "wasm_bindgen_executor")]
            WasmBindgenHandle => {
                use futures::future::FutureExt;
                let (future, handle) = future.remote_handle();
                wasm_bindgen_futures::spawn_local(future);
                JoinHandleInner::<T>::RemoteHandle(Some(handle))
            }
        };

        JoinHandle{inner}
    }
/// Spawns a future that doesn't implement [Send].
/// The spawned future will be executed on the same thread that called `spawn_local`.
/// [Send]: https://doc.rust-lang.org/std/marker/trait.Send.html
Spawns a future that doesn't implement [Send].
The spawned future will be executed on the same thread that called `spawn_local`.
Spawns a future that doesn ' t implement [ Send ] . The spawned future will be executed on the same thread that called ` spawn_local ` .
pub fn spawn_local<F, T>(&self, future: F) -> JoinHandle<T>
    where
        F: Future<Output = T> + 'static,
        T: Send + 'static,
    {
        let inner = match &self.inner {
            #[cfg(feature = "tokio_executor")]
            TokioHandle => {
                JoinHandleInner::<T>::Tokio(Some(tokio::task::spawn_local(future)))
            },
            #[cfg(feature = "async_std_executor")]
            AsyncStdHandle => {
                JoinHandleInner::<T>::AsyncStd(Some(async_std::task::spawn_local(future)))
            },
            #[cfg(feature = "smol_executor")]
            SmolHandle(executor) => {
                JoinHandleInner::<T>::Smol(Some(executor.spawn(future)))
            },
            #[cfg(feature = "futures_executor")]
            FuturesHandle(executor) => {
                use futures::future::FutureExt;
                let (future, handle) = future.remote_handle();
                executor.spawn_local(future).expect("Local spawn error");
                JoinHandleInner::<T>::RemoteHandle(Some(handle))
            },
            #[cfg(feature = "wasm_bindgen_executor")]
            WasmBindgenHandle => {
                use futures::future::FutureExt;
                let (future, handle) = future.remote_handle();
                wasm_bindgen_futures::spawn_local(future);
                JoinHandleInner::<T>::RemoteHandle(Some(handle))
            }
        };
        JoinHandle{inner}
    }
pub fn spawn_local < F , T > ( & self , future : F ) -> JoinHandle < T > where F : Future < Output = T > + ' static , T : Send + ' static , { let inner = match & self . inner { # [ cfg ( feature " " ) ] TokioHandle => { JoinHandleInner :: < T > :: Tokio ( Some ( tokio :: task :: spawn_local ( future ) ) ) } , # [ cfg ( feature " " ) ] AsyncStdHandle => { JoinHandleInner :: < T > :: AsyncStd ( Some ( async_std :: task :: spawn_local ( future ) ) ) } , # [ cfg ( feature " " ) ] SmolHandle ( executor ) => { JoinHandleInner :: < T > :: Smol ( Some ( executor . spawn ( future ) ) ) } , # [ cfg ( feature " " ) ] FuturesHandle ( executor ) => { use futures :: future :: FutureExt ; let ( future , handle ) = future . remote_handle ( ) ; executor . spawn_local ( future ) . expect ( " " ) ; JoinHandleInner :: < T > :: RemoteHandle ( Some ( handle ) ) } , # [ cfg ( feature " " ) ] WasmBindgenHandle => { use futures :: future :: FutureExt ; let ( future , handle ) = future . remote_handle ( ) ; wasm_bindgen_futures :: spawn_local ( future ) ; JoinHandleInner :: < T > :: RemoteHandle ( Some ( handle ) ) } } ; JoinHandle { inner } }
Spawns a future that doesn't implement [Send].
Spawns a future that doesn ' t implement [ Send ] .
&self
future
F