CMS 3D CMS Logo

include_first_syncWait.h
Go to the documentation of this file.
1 #ifndef FWCore_Concurrency_syncWait_h
2 #define FWCore_Concurrency_syncWait_h
3 //
4 // syncWait.h
5 //
6 // Created by Chris Jones on 2/24/21.
7 //
10 #include "oneapi/tbb/task_group.h"
11 #include <exception>
12 
13 namespace edm {
14  template <typename F>
15  [[nodiscard]] std::exception_ptr syncWait(F&& iFunc) {
16  std::exception_ptr exceptPtr{};
17  oneapi::tbb::task_group group;
19  group.run([&]() { iFunc(WaitingTaskHolder(group, &last)); }); //group.run
20 
21  return last.waitNoThrow();
22  }
23 } // namespace edm
24 #endif /* FWCore_Concurrency_syncWait_h */
std::exception_ptr syncWait(F &&iFunc)
HLT enums.
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163