38 m_nodeCache{
new WaitNode[iInitialSize]},
39 m_nodeCacheSize{iInitialSize},
40 m_lastAssignedCacheIndex{0},
42 auto nodeCache = m_nodeCache.get();
43 for (
auto it = nodeCache, itEnd = nodeCache + m_nodeCacheSize; it != itEnd; ++it) {
44 it->m_fromCache =
true;
62 for (
auto it = nodeCache, itEnd = nodeCache +
m_nodeCacheSize; it != itEnd; ++it) {
63 it->m_fromCache =
true;
80 returnValue->
m_task = iTask;
84 returnValue->
m_next.store(returnValue, std::memory_order_relaxed);
90 iTask->increment_ref_count();
95 if (0 == iTask->decrement_ref_count()) {
96 tbb::task::spawn(*iTask);
111 if (
nullptr == oldHead) {
149 while (
n == (
next =
n->nextNode())) {
156 if (!
n->m_fromCache) {
163 if (0 ==
t->decrement_ref_count()) {
164 tbb::task::spawn(*
t);