Function tiny_future::async [−][src]
pub fn async<T: 'static, F: FnOnce(Future<T, ()>) + Send + 'static>(
job: F
) -> Future<T, ()>
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.