7 #ifndef PXR_BASE_WORK_TASK_GRAPH_H
8 #define PXR_BASE_WORK_TASK_GRAPH_H
17 #include <tbb/enumerable_thread_specific.h>
40 #if defined WORK_IMPL_HAS_TASK_GRAPH
41 using _Impl = PXR_WORK_IMPL_NS::WorkImpl_TaskGraph;
60 using TaskLists = tbb::enumerable_thread_specific<TaskList>;
67 template <
typename F,
typename ... Args>
132 template <
typename F,
typename ... Args>
134 return _Base::AllocateChild<F>(std::forward<Args>(
args)...);
int RemoveChildReference()
virtual BaseTask * execute()=0
WORK_API void RunLists(const TaskLists &taskLists)
int RemoveChildReference()
#define PXR_NAMESPACE_OPEN_SCOPE
F * AllocateTask(Args &&...args)
WorkTaskGraph & operator=(WorkTaskGraph const &)=delete
void Wait()
Wait on all the running tasks to complete.
virtual WORK_API ~BaseTask()
F * AllocateTask(Args &&...args)
void _RecycleAsContinuation()
void _RecycleAsContinuation()
#define PXR_NAMESPACE_CLOSE_SCOPE
**If you just want to fire and args
F * AllocateChild(Args &&...args)
std::vector< BaseTask * > TaskList
Container for allocated tasks to be spawned.
~WorkTaskGraph() noexcept=default
tbb::enumerable_thread_specific< TaskList > TaskLists
Thread-local storage for allocated tasks to be spawned.