Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RNTupleImtTaskScheduler.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleImtTaskScheduler.hxx
2/// \author Jakob Blomer <jblomer@cern.ch>
3/// \date 2024-02-19
4/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
5/// is welcome!
6
7/*************************************************************************
8 * Copyright (C) 1995-2024, Rene Brun and Fons Rademakers. *
9 * All rights reserved. *
10 * *
11 * For the licensing terms see $ROOTSYS/LICENSE. *
12 * For the list of contributors see $ROOTSYS/README/CREDITS. *
13 *************************************************************************/
14
15#ifndef ROOT_RNTupleImtTaskScheduler
16#define ROOT_RNTupleImtTaskScheduler
17
18#ifdef R__USE_IMT
19
20#include <ROOT/RPageStorage.hxx>
21#include <ROOT/TTaskGroup.hxx>
22
23#include <functional>
24#include <utility>
25
26namespace ROOT {
27namespace Experimental {
28
29namespace Internal {
30
32private:
34
35public:
37 ~RNTupleImtTaskScheduler() override = default;
38 void AddTask(const std::function<void(void)> &taskFunc) final { fTaskGroup.Run(taskFunc); }
39 void Wait() final { fTaskGroup.Wait(); }
40};
41
42} // namespace Internal
43} // namespace Experimental
44} // namespace ROOT
45
46#endif // R__USE_IMT
47#endif // ROOT_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.
A class to manage the asynchronous execution of work items.
The interface of a task scheduler to schedule page (de)compression tasks.
Namespace for ROOT features in testing.
Definition TROOT.h:100