#include <LimitedTaskQueue.h>
Public Member Functions | |
LimitedTaskQueue (unsigned int iLimit) | |
template<typename T > | |
void | push (const T &iAction) |
asynchronously pushes functor iAction into queue More... | |
template<typename T > | |
void | pushAndWait (const T &iAction) |
synchronously pushes functor iAction into queue More... | |
Private Member Functions | |
LimitedTaskQueue (const LimitedTaskQueue &)=delete | |
const LimitedTaskQueue & | operator= (const LimitedTaskQueue &)=delete |
Private Attributes | |
std::vector< SerialTaskQueue > | m_queues |
Definition at line 38 of file LimitedTaskQueue.h.
|
inline |
Definition at line 41 of file LimitedTaskQueue.h.
References operator=(), push(), and pushAndWait().
|
privatedelete |
|
privatedelete |
Referenced by LimitedTaskQueue().
void LimitedTaskQueue::push | ( | const 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 78 of file LimitedTaskQueue.h.
References m_queues, and lumiQueryAPI::q.
Referenced by LimitedTaskQueue().
void LimitedTaskQueue::pushAndWait | ( | const 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.
[in] | iAction | Must be a functor that takes no arguments and return no values. |
Definition at line 91 of file LimitedTaskQueue.h.
References pyrootRender::destroy(), m_queues, and lumiQueryAPI::q.
Referenced by LimitedTaskQueue().
|
private |
Definition at line 74 of file LimitedTaskQueue.h.
Referenced by push(), and pushAndWait().