Function tiny_future::async_with_state[][src]

pub fn async_with_state<T: 'static, U: 'static, F: FnOnce(Future<T, U>) + Send + 'static>(
    job: F,
    shared_state: U
) -> Future<T, U>

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.