omni::kit::exec::core::unstable::ParallelSpawner
Defined in omni/kit/exec/core/unstable/ParallelScheduler.h
-
struct ParallelSpawner
Interface executors use to talk to the scheduler. Every executor object that wishes to use the ParallelScheduler (which is a singleton) will have its own associated instance of ParallelSpawner.
Public Functions
-
inline ParallelSpawner(graph::exec::unstable::IExecutionContext *context)
Constructor.
-
inline ~ParallelSpawner()
Destructor.
-
template<typename Fn>
inline graph::exec::unstable::Status schedule(Fn &&task, graph::exec::unstable::SchedulingInfo schedInfo) Thread-safe schedule method called by executor to enqueue generated work. Supports parallel, serial and isolate scheduling constraints.
Protected Attributes
-
graph::exec::unstable::IExecutionContext *m_context
Execution context used to identify kickstarting threads for the scheduling of serial and isolate tasks.
-
tbb::empty_task *m_root = {nullptr}
Root task for all spawned tasks.
-
std::atomic<graph::exec::unstable::Status> m_status = {graph::exec::unstable::Status::eUnknown}
Accumulated status.
-
ParallelScheduler &m_scheduler
To avoid calling into getSingleton multiple times.
-
inline ParallelSpawner(graph::exec::unstable::IExecutionContext *context)