Go to the documentation of this file.
40 m_nodeCache{
new WaitNode[iInitialSize]},
41 m_nodeCacheSize{iInitialSize},
42 m_lastAssignedCacheIndex{0},
44 auto nodeCache = m_nodeCache.get();
45 for (
auto it = nodeCache, itEnd = nodeCache + m_nodeCacheSize; it != itEnd; ++it) {
46 it->m_fromCache =
true;
62 m_nodeCache = std::make_unique<WaitNode[]>(nSeenTasks);
64 for (
auto it = nodeCache, itEnd = nodeCache +
m_nodeCacheSize; it != itEnd; ++it) {
65 it->m_fromCache =
true;
82 returnValue->
m_task = iTask;
87 returnValue->
m_next.store(returnValue, std::memory_order_relaxed);
111 if (
nullptr == oldHead) {
132 iGroup->run([iTask]() {
150 if (
nullptr == oldHead) {
188 while (
n == (
next =
n->nextNode())) {
196 if (!
n->m_fromCache) {
203 if (0 ==
t->decrement_ref_count()) {
std::atomic< WaitNode * > m_head
std::unique_ptr< WaitNode[]> m_nodeCache
std::atomic< bool > m_waiting
std::atomic< unsigned int > m_lastAssignedCacheIndex
void doneWaiting(std::exception_ptr iExcept)
std::atomic< WaitNode * > m_next
tbb::task_group * m_group
void reset()
Resets access to the resource so that added tasks will wait.
void presetTaskAsFailed(std::exception_ptr iExcept)
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
WaitNode * nextNode() const
WaitingTask * release_no_decrement() noexcept
void dependentTaskFailed(std::exception_ptr iPtr)
Called if waited for task failed.
unsigned int m_nodeCacheSize
void increment_ref_count()
unsigned int decrement_ref_count()
void add(tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
WaitingTaskList(unsigned int iInitialSize=2)
Constructor.
WaitNode * createNode(tbb::task_group *iGroup, WaitingTask *iTask)
std::exception_ptr m_exceptionPtr
void setNextNode(WaitNode *iNext)
tbb::task_group * group() const noexcept
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g