Function desync::scheduler::future

source ·
pub fn future<TFn, Item: 'static + Send>(
    queue: &Arc<JobQueue>,
    job: TFn
) -> Box<dyn Future<Item = Item, Error = Canceled>>where
    TFn: 'static + Send + FnOnce() -> Item,
Expand description

Schedules a job to run and returns a future for retrieving the result