1 #ifndef FWCore_Concurrency_LimitedTaskQueue_h
2 #define FWCore_Concurrency_LimitedTaskQueue_h
55 void push(tbb::task_group& iGroup,
T&& iAction);
81 iOther.m_queue =
nullptr;
104 template <
typename T>
114 template <
typename T>
116 auto set_to_run = std::make_shared<std::atomic<bool>>(
false);
118 q.push(iGroup, [set_to_run, iAction]()
mutable {
119 bool expected =
false;
120 if (set_to_run->compare_exchange_strong(expected,
true)) {
127 template <
typename T>
129 auto set_to_run = std::make_shared<std::atomic<bool>>(
false);
131 q.push(iGroup, [&
q, set_to_run, iAction]()
mutable {
132 bool expected =
false;
133 if (set_to_run->compare_exchange_strong(expected,
true)) {