Function stakker_async_await::future_pull[][src]

pub fn future_pull<T>(
    core: &mut Core,
    ret: Ret<Ret<T>>
) -> impl Future<Output = T>

Create a pull-style RetFuture pipe, that drops the task on failure

This returns a Future which when polled will send a message to the provided stakker::Ret instance in order to request a value. So it “pulls” the value only on demand. The provided stakker::Ret instance is given a stakker::Ret to use to send back the value. If the value is not provided, either because there is nothing left running to handle the stakker::Ret sent, or if the provided stakker::Ret is dropped, then the reference to the task is dropped, which means that the whole async execution of that task will end abruptly at the current .await. To handle stakker::Ret being dropped, see future_pull.