13template <
typename V,
typename E,
bool Lazy>
21 template <
typename Promise>
24#if YACLIB_FINAL_SUSPEND_TRANSFER != 0
26#elif YACLIB_SYMMETRIC_TRANSFER != 0
39 template <
typename V,
typename E>
43template <
typename V,
typename E,
bool Lazy>
61 return yaclib_std::suspend_always{};
63 return yaclib_std::suspend_never{};
72 this->
Store(std::current_exception());
75 template <
typename Value>
81 this->
Store(std::in_place);
85 auto handle = yaclib_std::coroutine_handle<PromiseType>::from_promise(*
this);
102#if YACLIB_SYMMETRIC_TRANSFER != 0
113 [[
nodiscard]] InlineCore* Here(InlineCore& caller)
noexcept final {
118#if YACLIB_SYMMETRIC_TRANSFER != 0
119 [[
nodiscard]] yaclib_std::coroutine_handle<>
Next(InlineCore& caller)
noexcept final {
133template <
typename V,
typename E>
Provides a mechanism to access the result of async operations.
A intrusive pointer to objects with an embedded reference count.
Provides a mechanism to schedule the some async operations TODO(MBkkt) add description.
void unhandled_exception() noexcept
void return_value(Unit) noexcept
auto get_return_object() noexcept
void return_value(Value &&value) noexcept(std::is_nothrow_constructible_v< Result< V, E >, Value && >)
Destroy final_suspend() noexcept
auto initial_suspend() noexcept
void Store(Args &&... args) noexcept(std::is_nothrow_constructible_v< Result< V, E >, Args &&... >)
#define YACLIB_ASSERT(cond)
YACLIB_INLINE void Loop(InlineCore *prev, InlineCore *curr) noexcept
Contract< V, E > MakeContract()
Creates related future and promise.
YACLIB_INLINE auto await_suspend(yaclib_std::coroutine_handle< Promise > handle) const noexcept
constexpr void await_resume() const noexcept
constexpr bool await_ready() const noexcept
void Sub(std::size_t) noexcept
static void Delete(ResultCore< V, E > &core) noexcept