D++ (DPP)
C++ Discord API Bot Library
|
Classes | |
struct | empty |
Empty result from void-returning awaitable. More... | |
class | promise_base |
Base class defining logic common to all promise types, aka the "write" end of an awaitable. More... | |
Typedefs | |
template<typename T > | |
using | result_t = std::variant< std::monostate, std::conditional_t< std::is_void_v< T >, empty, T >, std::exception_ptr > |
Variant for the 3 conceptual values of a coroutine: More... | |
Enumerations | |
enum | state_flags { sf_none = 0b0000000 , sf_has_awaitable = 0b00000001 , sf_awaited = 0b00000010 , sf_ready = 0b00000100 , sf_done = 0b00001000 , sf_broken = 0b0010000 } |
State of a promise. More... | |
Functions | |
template<typename T > | |
void | spawn_sync_wait_job (auto *awaitable, std::condition_variable &cv, auto &&result) |
using dpp::detail::promise::result_t = typedef std::variant<std::monostate, std::conditional_t<std::is_void_v<T>, empty, T>, std::exception_ptr> |
Variant for the 3 conceptual values of a coroutine:
enum dpp::detail::promise::state_flags |
void dpp::detail::promise::spawn_sync_wait_job | ( | auto * | awaitable, |
std::condition_variable & | cv, | ||
auto && | result | ||
) |