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

Method set_active

source/executors/thread_pool_executor.cpp:99–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void idle_worker_set::set_active(size_t idle_thread) noexcept {
100 const auto before = m_idle_flags[idle_thread].flag.exchange(status::active, std::memory_order_relaxed);
101 if (before == status::active) {
102 return;
103 }
104
105 m_approx_size.fetch_sub(1, std::memory_order_relaxed);
106}
107
108bool idle_worker_set::try_acquire_flag(size_t index) noexcept {
109 const auto worker_status = m_idle_flags[index].flag.load(std::memory_order_relaxed);

Callers 1

mark_worker_activeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected