10 auto next = _callback.load(std::memory_order_acquire);
12 if (next == kResult) {
16 }
while (!_callback.compare_exchange_weak(next,
reinterpret_cast<std::uintptr_t
>(&
callback),
17 std::memory_order_release, std::memory_order_acquire));
21 return _callback.load(std::memory_order_acquire) ==
expected &&
22 _callback.compare_exchange_strong(
expected,
reinterpret_cast<std::uintptr_t
>(&
callback),
23 std::memory_order_release, std::memory_order_acquire);
27template bool BaseCore::SetCallbackImpl<false>(
InlineCore&)
noexcept;
28template bool BaseCore::SetCallbackImpl<true>(
InlineCore&)
noexcept;
36template <
bool SymmetricTransfer,
bool Shared>
47#if YACLIB_SYMMETRIC_TRANSFER != 0
52template <
bool SymmetricTransfer,
bool Shared>
86#if YACLIB_SYMMETRIC_TRANSFER != 0
virtual void DecRef() noexcept
Decrements reference counter.
bool SetCallbackImpl(InlineCore &callback) noexcept
bool ResetImpl() noexcept
Transfer< SymmetricTransfer > SetInlineImpl(InlineCore &callback) noexcept
yaclib_std::atomic_uintptr_t _callback
Transfer< SymmetricTransfer > SetResultImpl() noexcept
#define YACLIB_ASSERT(cond)
YACLIB_INLINE void Loop(InlineCore *prev, InlineCore *curr) noexcept
Contract< V, E > MakeContract()
Creates related future and promise.