/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/Concurrency/interface/include_first_syncWait.h
24 строки
695 B
W. David Dagenhart
Delete unused code related to EventSetup
21 фев 2023, 01:58
21 фев 2023, 01:58
b5facf1
Код
Авторство
О чём код?
#ifndef FWCore_Concurrency_syncWait_h #define FWCore_Concurrency_syncWait_h // // syncWait.h // // Created by Chris Jones on 2/24/21. // #include "FWCore/Concurrency/interface/WaitingTaskHolder.h" #include "FWCore/Concurrency/interface/FinalWaitingTask.h" #include "oneapi/tbb/task_group.h" #include <exception> namespace edm { template <typename F> [[nodiscard]] std::exception_ptr syncWait(F&& iFunc) { std::exception_ptr exceptPtr{}; oneapi::tbb::task_group group; FinalWaitingTask last{group}; group.run([&]() { iFunc(WaitingTaskHolder(group, &last)); }); //group.run return last.waitNoThrow(); } } // namespace edm #endif /* FWCore_Concurrency_syncWait_h */