10 _callback.store(
reinterpret_cast<std::uintptr_t
>(&
callback), std::memory_order_relaxed);
23 return _callback.load(std::memory_order_acquire) ==
expected &&
24 _callback.compare_exchange_strong(
expected,
reinterpret_cast<std::uintptr_t
>(&
callback),
25 std::memory_order_release, std::memory_order_acquire);
40template <
bool SymmetricTransfer>
48template <
bool SymmetricTransfer>
66 callback._executor = std::move(_executor);
71#if YACLIB_SYMMETRIC_TRANSFER != 0
76#if YACLIB_SYMMETRIC_TRANSFER != 0
void StoreCallback(InlineCore &callback) noexcept
Transfer< SymmetricTransfer > SetInline(InlineCore &callback) noexcept
void MoveExecutorTo(BaseCore &callback) noexcept
bool SetCallback(InlineCore &callback) noexcept
BaseCore(State callback) noexcept
yaclib_std::atomic_uintptr_t _callback
bool Empty() const noexcept
Transfer< SymmetricTransfer > SetResult() noexcept
void CallInline(InlineCore &callback) noexcept
#define YACLIB_DEBUG(cond, message)
#define YACLIB_ASSERT(cond)
auto SetCallback(ResultCorePtr< Arg, E > &core, IExecutor *executor, Func &&f)
Contract< V, E > MakeContract()
Creates related future and promise.