12#include "RConfigure.h"
18#define TBB_PREVIEW_ISOLATED_TASK_GROUP 1
19#include "tbb/task_group.h"
20#include "tbb/task_arena.h"
45 return (tbb::isolated_task_group *)
p;
51namespace Experimental {
63 throw std::runtime_error(
"Implicit parallelism not enabled. Cannot instantiate a TTaskGroup.");
72 *
this = std::move(other);
79 other.fTaskContainer =
nullptr;
99 fTaskArenaW->Access().execute([&] { operation(); });
winID h TVirtualViewer3D TVirtualGLPainter p
A class to manage the asynchronous execution of work items.
std::shared_ptr< ROOT::Internal::RTaskArenaWrapper > fTaskArenaW
void ExecuteInIsolation(const std::function< void(void)> &operation)
Run operation in the internal task arena to implement work isolation, i.e.
void Run(const std::function< void(void)> &closure)
Add to the group an item of work which will be ran asynchronously.
void Wait()
Wait until all submitted items of work are completed.
void Cancel()
Cancel all submitted tasks immediately.
TTaskGroup & operator=(TTaskGroup &&other)
std::shared_ptr< ROOT::Internal::RTaskArenaWrapper > GetGlobalTaskArena(unsigned maxConcurrency=0)
Factory function returning a shared pointer to the instance of the global RTaskArenaWrapper.
tbb::isolated_task_group * CastToTG(void *p)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.