13#include <yaclib_std/atomic>
24 kResult = std::numeric_limits<std::uintptr_t>::max(),
32 template <
bool Shared>
54 this->
_callback.store(
reinterpret_cast<std::uintptr_t
>(&
callback), std::memory_order_relaxed);
57 template <
bool Shared>
77 return core.SetCallbackImpl<
false>(
callback);
81 return core.ResetImpl();
84 template <
bool SymmetricTransfer>
94 return core.SetCallbackImpl<
true>(
callback);
bool SetCallbackImpl(InlineCore &callback) noexcept
void TransferExecutorTo(BaseCore &callback) noexcept
bool ResetImpl() noexcept
Transfer< SymmetricTransfer > SetInlineImpl(InlineCore &callback) noexcept
yaclib_std::atomic_uintptr_t _callback
Transfer< SymmetricTransfer > SetResultImpl() noexcept
bool Empty() const noexcept
BaseCore(State state) noexcept
void StoreCallbackImpl(InlineCore &callback) noexcept
#define YACLIB_ASSERT(cond)
#define YACLIB_PURE_VIRTUAL()
IExecutor & MakeInline() noexcept
Get Inline executor singleton object.
Contract< V, E > MakeContract()
Creates related future and promise.
bool SetCallback(InlineCore &callback) noexcept
bool SetCallback(InlineCore &callback) noexcept
void StoreCallback(InlineCore &callback) noexcept
Transfer< SymmetricTransfer > SetResult() noexcept