dpp::detail::promise
dpp::detail::promise::empty
dpp::detail::promise::promise_base
state_flags
dpp::detail::promise::state_flags
sf_none
= 0b0000000

Promise is empty.

sf_has_awaitable
= 0b00000001

Promise has spawned an awaitable.

sf_awaited
= 0b00000010

Promise is being awaited.

sf_ready
= 0b00000100

Promise has a result.

sf_done
= 0b00001000

Promise has completed, no more results are expected.

sf_broken
= 0b0010000

Promise was broken - future or promise is gone.

State of a promise.

typename T
std::variant< std::monostate, std::conditional_t< std::is_void_v< T >, empty, T >, std::exception_ptr > using dpp::detail::promise::result_t = std::variant<std::monostate, std::conditional_t<std::is_void_v<T>, empty, T>, std::exception_ptr> result_t dpp::detail::promise::result_t

Variant for the 3 conceptual values of a coroutine:

typename T
void void dpp::detail::promise::spawn_sync_wait_job (auto *awaitable, std::condition_variable &cv, auto &&result) spawn_sync_wait_job dpp::detail::promise::spawn_sync_wait_job auto * awaitable std::condition_variable & cv auto && result