| 77 | } |
| 78 | |
| 79 | bool when_any_context::finish_processing() noexcept { |
| 80 | assert(m_status.load(std::memory_order_relaxed) != k_done_processing); |
| 81 | |
| 82 | // tries to turn k_processing -> k_done_processing. |
| 83 | auto expected_state = k_processing; |
| 84 | const auto res = m_status.compare_exchange_strong(expected_state, k_done_processing, std::memory_order_acq_rel); |
| 85 | return res; // if k_processing -> k_done_processing, then no result finished before the CAS, suspend. |
| 86 | } |
| 87 | |
| 88 | void when_any_context::try_resume(result_state_base& completed_result) noexcept { |
| 89 | /* |