18 printf(
"Running workItem0...\n");
22 void mt303_AsyncSimple()
29 printf(
"Running workItem1...\n");
33 printf(
"Running something in the \"main\" thread\n");
35 std::cout <<
"The result of the work item 0 is " << wi0.get() << std::endl;
36 std::cout <<
"The result of the work item 1 is " << wi1.get() << std::endl;
38 printf(
"All work completed.\n");
TFuture< typename std::result_of< typename std::decay< Function >::type(typename std::decay< Args >::type...)>::type > Async(Function &&f, Args &&... args)
Runs a function asynchronously potentially in a new thread and returns a ROOT TFuture that will hold ...
int main(int argc, char **argv)
void EnableImplicitMT(UInt_t numthreads=0)
Enable ROOT's implicit multi-threading for all objects and methods that provide an internal paralleli...