execution_promise


This is the most basic promise. It simply begins execution on creation, and cleans itself up after completion. execution_promise satisfies the Execution concept.

The only coroutine key word available is co_return (void) and co_await (AwaitableProxy).


class zab::execution_promise

This simplest promise type to allow a function to behave in asyncronous ways.

Public Functions

inline std::coroutine_handle<execution_promise> get_return_object() noexcept

Gets the coroutine handle from this.

Returns

The coroutine handle.

inline auto initial_suspend() noexcept

All execution_promise’s’ begin execution on function call.

Returns

A std::suspend_never.

inline auto final_suspend() noexcept

When execution completes, the coroutine will clean itself up.

Returns

A std::suspend_never.

inline void return_void() noexcept

Returning is a no-op.

inline void unhandled_exception()

Exceptions are currently not implermented.