1
0
mirror of https://github.com/fluencelabs/wasm-bindgen synced 2025-03-31 17:31:06 +00:00
This commit is contained in:
Richard Dodd 2019-01-05 14:37:39 +00:00
parent c849ef3cf4
commit 25ac4549a0

@ -378,7 +378,14 @@ fn _future_to_promise(future: Box<Future<Item = JsValue, Error = JsValue>>) -> P
} }
} }
/// Spawns a future. /// Converts a Rust `Future` on a local task queue.
///
/// The `future` provided must adhere to `'static` because it'll be scheduled
/// to run in the background and cannot contain any stack references.
///
/// # Panics
///
/// This function has the same panic behavior as `future_to_promise`.
pub fn spawn_local<F>(future: F) pub fn spawn_local<F>(future: F)
where where
F: Future<Item = (), Error = ()> + 'static, F: Future<Item = (), Error = ()> + 'static,