19 #if FOLLY_HAS_COROUTINES 31 state_.load(std::memory_order_relaxed) ==
static_cast<void*
>(
this) ||
32 state_.load(std::memory_order_relaxed) ==
nullptr);
36 void* signalledState =
static_cast<void*
>(
this);
37 void* oldValue =
state_.exchange(signalledState, std::memory_order_acq_rel);
38 if (oldValue != signalledState && oldValue !=
nullptr) {
41 WaitOperation* awaiter =
static_cast<WaitOperation*
>(oldValue);
42 awaiter->awaitingCoroutine_.resume();
47 void* oldValue =
nullptr;
48 if (!
state_.compare_exchange_strong(
50 static_cast<void*>(awaiter),
51 std::memory_order_release,
52 std::memory_order_acquire)) {
56 assert(oldValue == static_cast<const void*>(
this));
62 #endif // FOLLY_HAS_COROUTINES
bool waitImpl(WaitOperation *awaiter) const noexcept
requires E e noexcept(noexcept(s.error(std::move(e))))
std::atomic< void * > state_