Converts a Future to a Task that cancels the future on cancellation.

Synopsis

Declared in <folly/coro/FutureUtil.h>

template<typename V>
Task<drop_unit_t<V>>
toTaskInterruptOnCancel(folly::Future<V> f);

Return Value

A Task yielding the future's result, interrupted on cancellation.

Parameters

Name

Description

f

The Future to await.

Created with MrDocs