MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / finish_processing

Method finish_processing

source/results/impl/consumer_context.cpp:79–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79bool 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
88void when_any_context::try_resume(result_state_base& completed_result) noexcept {
89 /*

Callers 1

await_suspendMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected