folly::coro::now_task

An immovable Task<T> that must be co_awaited in the expression that created it.

Synopsis

Declared in <folly/coro/safe/NowTask.h>

template<typename T = void>
class [[nodiscard]] now_task final

Member Functions

NameDescription
as_unsafe [deprecated]Escape hatch that unwraps this task into the unsafe Task API.

Protected Using Declarations

Name
Unnamed using

Friends

NameDescription
folly::coro::to_now_taskConverts a now_task into a now_task; friended so it can construct and unwrap one.
folly::coro::to_now_taskConverts a safe_task into a now_task; friended so it can construct one.
folly::coro::to_now_taskConverts a Task into a now_task; friended so it can construct one.

Non-Member Functions

NameDescription
make_error_now_taskMake a now_task that will trivially yield an exception.
make_now_taskSame as make_now_task(). See Unit
make_now_taskMake a now_task that trivially returns no value
make_now_taskMake a now_task that trivially returns a value.
to_now_taskConverts a now_task into an equivalent now_task.

Return Value

NOTE

The return value should not be discarded.