[−][src]Function tiny_future::run_async_with_state
pub fn run_async_with_state<T, U, F>(job: F, shared_state: U) -> Future<T, U> where
T: 'static + Send,
U: 'static + Send,
F: FnOnce(Future<T, U>) + Send + 'static,
Creates a future for job
and runs job
. The result of job
will be set as result into the
future. The parameter passed to job
is a function that returns if the future is still waiting
so that job
can check for cancellation.