Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleImtTaskScheduler.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleImtTaskScheduler.hxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2024-02-19
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2024, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#ifndef ROOT7_RNTupleImtTaskScheduler
17#define ROOT7_RNTupleImtTaskScheduler
18
19#ifdef R__USE_IMT
20
21#include <ROOT/RPageStorage.hxx>
22#include <ROOT/TTaskGroup.hxx>
23
24#include <functional>
25#include <utility>
26
27namespace ROOT {
28namespace Experimental {
29
30namespace Internal {
31
33private:
35
36public:
38 ~RNTupleImtTaskScheduler() override = default;
39 void AddTask(const std::function<void(void)> &taskFunc) final { fTaskGroup.Run(taskFunc); }
40 void Wait() final { fTaskGroup.Wait(); }
41};
42
43} // namespace Internal
44} // namespace Experimental
45} // namespace ROOT
46
47#endif // R__USE_IMT
48#endif // ROOT7_RNTupleImtTaskScheduler
void AddTask(const std::function< void(void)> &taskFunc) final
Take a callable that represents a task.
void Wait() final
Blocks until all scheduled tasks finished.
The interface of a task scheduler to schedule page (de)compression tasks.
A class to manage the asynchronous execution of work items.
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.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...