12#include "RConfigure.h"
18#include "tbb/task_group.h"
19#include "tbb/task_arena.h"
40 return (tbb::task_group *) p;
45 return (tbb::task_arena *)p;
52namespace Experimental {
64 throw std::runtime_error(
"Implicit parallelism not enabled. Cannot instantiate a TTaskGroup.");
73 *
this = std::move(other);
79 other.fTaskContainer =
nullptr;
A class to manage the asynchronous execution of work items.
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::atomic< bool > fCanRun
tbb::task_arena * CastToTA(void *p)
tbb::task_group * CastToTG(void *p)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Namespace for new ROOT classes and functions.
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
UInt_t GetImplicitMTPoolSize()
Returns the size of the pool used for implicit multi-threading.