File indexing completed on 2025-01-30 10:22:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TTaskGroup
0013 #define ROOT_TTaskGroup
0014
0015 #include <atomic>
0016 #include <memory>
0017 #include <functional>
0018
0019 namespace ROOT {
0020 namespace Internal {
0021 class RTaskArenaWrapper;
0022 }
0023
0024 namespace Experimental {
0025
0026 class TTaskGroup {
0027
0028
0029
0030
0031
0032
0033
0034
0035 private:
0036 std::shared_ptr<ROOT::Internal::RTaskArenaWrapper> fTaskArenaW;
0037 void *fTaskContainer{nullptr};
0038 void ExecuteInIsolation(const std::function<void(void)> &operation);
0039
0040 public:
0041 TTaskGroup();
0042 TTaskGroup(TTaskGroup &&other);
0043 TTaskGroup(const TTaskGroup &) = delete;
0044 TTaskGroup &operator=(TTaskGroup &&other);
0045 ~TTaskGroup();
0046
0047 void Cancel();
0048 void Run(const std::function<void(void)> &closure);
0049 void Wait();
0050 };
0051 }
0052 }
0053
0054 #endif