#include <SerialTaskQueueChain.h>
Definition at line 32 of file SerialTaskQueueChain.h.
◆ SerialTaskQueueChain() [1/4]
edm::SerialTaskQueueChain::SerialTaskQueueChain |
( |
| ) |
|
|
inline |
◆ SerialTaskQueueChain() [2/4]
edm::SerialTaskQueueChain::SerialTaskQueueChain |
( |
std::vector< std::shared_ptr< SerialTaskQueue >> |
iQueues | ) |
|
|
inlineexplicit |
◆ SerialTaskQueueChain() [3/4]
◆ SerialTaskQueueChain() [4/4]
◆ actionToRun()
template<typename T >
void SerialTaskQueueChain::actionToRun |
( |
T && |
iAction | ) |
|
|
private |
◆ numberOfQueues()
std::size_t edm::SerialTaskQueueChain::numberOfQueues |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ outstandingTasks()
unsigned long edm::SerialTaskQueueChain::outstandingTasks |
( |
| ) |
const |
|
inline |
◆ passDownChain()
template<typename T >
void SerialTaskQueueChain::passDownChain |
( |
unsigned int |
iIndex, |
|
|
T && |
iAction |
|
) |
| |
|
private |
◆ push()
template<typename T >
void SerialTaskQueueChain::push |
( |
T && |
iAction | ) |
|
◆ pushAndWait()
template<typename T >
void SerialTaskQueueChain::pushAndWait |
( |
T && |
iAction | ) |
|
synchronously pushes functor iAction into queue
The function will wait until iAction has completed before returning. If another task is already running on the queue, the system is allowed to find another TBB task to execute while waiting for the iAction to finish. In that way the core is not idled while waiting.
- Parameters
-
[in] | iAction | Must be a functor that takes no arguments and return no values. |
Definition at line 97 of file SerialTaskQueueChain.h.
98 auto destry = [](
tbb::task* iTask) { tbb::task::destroy(*iTask); };
101 waitTask->set_ref_count(3);
103 std::exception_ptr ptr;
104 auto waitTaskPtr = waitTask.get();
105 push([waitTaskPtr, iAction, &ptr]() {
107 auto dec = [](
tbb::task* iTask) { iTask->decrement_ref_count(); };
111 ptr = std::current_exception();
115 waitTask->decrement_ref_count();
116 waitTask->wait_for_all();
119 std::rethrow_exception(ptr);
References CMS_SA_ALLOW, TauDecayModes::dec, push(), and TrackValidation_cff::task.
Referenced by edm::Worker::TaskQueueAdaptor::pushAndWait().
◆ m_outstandingTasks
std::atomic<unsigned long> edm::SerialTaskQueueChain::m_outstandingTasks {0} |
|
private |
◆ m_queues
std::vector<std::shared_ptr<SerialTaskQueue> > edm::SerialTaskQueueChain::m_queues |
|
private |