#include <LimitedTaskQueue.h>
Classes | |
class | Resumer |
Public Member Functions | |
unsigned int | concurrencyLimit () const |
LimitedTaskQueue (const LimitedTaskQueue &)=delete | |
LimitedTaskQueue (unsigned int iLimit) | |
const LimitedTaskQueue & | operator= (const LimitedTaskQueue &)=delete |
template<typename T > | |
void | push (tbb::task_group &iGroup, T &&iAction) |
asynchronously pushes functor iAction into queue More... | |
template<typename T > | |
void | pushAndPause (tbb::task_group &iGroup, T &&iAction) |
asynchronously pushes functor iAction into queue then pause the queue and run iAction More... | |
Private Attributes | |
std::vector< SerialTaskQueue > | m_queues |
Definition at line 39 of file LimitedTaskQueue.h.
|
inline |
Definition at line 41 of file LimitedTaskQueue.h.
|
delete |
|
inline |
Definition at line 107 of file LimitedTaskQueue.h.
References m_queues.
Referenced by edm::limited::EDFilterBase::concurrencyLimit(), edm::limited::EDAnalyzerBase::concurrencyLimit(), edm::limited::EDProducerBase::concurrencyLimit(), and edm::limited::OutputModuleBase::concurrencyLimit().
|
delete |
void LimitedTaskQueue::push | ( | tbb::task_group & | iGroup, |
T && | iAction | ||
) |
asynchronously pushes functor iAction into queue
The function will return immediately and iAction will either process concurrently with the calling thread or wait until the protected resource becomes available or until a CPU becomes available.
[in] | iAction | Must be a functor that takes no arguments and return no values. |
Definition at line 115 of file LimitedTaskQueue.h.
References m_queues, and submitPVResolutionJobs::q.
Referenced by edm::Worker::TaskQueueAdaptor::push().
void LimitedTaskQueue::pushAndPause | ( | tbb::task_group & | iGroup, |
T && | iAction | ||
) |
asynchronously pushes functor iAction into queue then pause the queue and run iAction
iAction must take as argument a copy of a LimitedTaskQueue::Resumer. To resume the queue let the last copy of the Resumer go out of scope, or call Resumer::resume(). Using this function will decrease the allowed concurrency limit by 1.
Definition at line 128 of file LimitedTaskQueue.h.
References m_queues, and submitPVResolutionJobs::q.
Referenced by edm::eventsetup::EventSetupRecordIOVQueue::startNewIOVAsync().
|
private |
Definition at line 111 of file LimitedTaskQueue.h.
Referenced by concurrencyLimit(), push(), and pushAndPause().