1 #ifndef FWCore_Framework_streamTransitionAsync_h
2 #define FWCore_Framework_streamTransitionAsync_h
50 bool cleaningUpAfterException) {
58 bool cleaningUpAfterException) {
62 template <
typename Traits>
65 unsigned int iStreamIndex,
66 typename Traits::TransitionInfoType& transitionInfo,
68 std::vector<SubProcess>& iSubProcesses) {
73 tbb::task::allocate_root(),
74 [&iSubProcesses, iWait, iStreamIndex,
info = transitionInfo](std::exception_ptr
const* iPtr)
mutable {
79 [iWait, excpt](std::exception_ptr
const*)
mutable { iWait.
doneWaiting(excpt); });
81 for (
auto& subProcess : iSubProcesses) {
85 for (
auto& subProcess : iSubProcesses) {
95 template <
typename Traits>
98 unsigned int iNStreams,
99 typename Traits::TransitionInfoType& transitionInfo,
101 std::vector<SubProcess>& iSubProcesses) {
103 for (
unsigned int i = 0;
i < iNStreams; ++
i) {
104 beginStreamTransitionAsync<Traits>(
WaitingTaskHolder(iWait), iSchedule,
i, transitionInfo,
token, iSubProcesses);
108 template <
typename Traits>
111 unsigned int iStreamIndex,
112 typename Traits::TransitionInfoType& transitionInfo,
114 std::vector<SubProcess>& iSubProcesses,
115 bool cleaningUpAfterException) {
121 tbb::task::allocate_root(),
122 [&iSubProcesses, iWait, iStreamIndex,
info = transitionInfo, cleaningUpAfterException](
123 std::exception_ptr
const* iPtr)
mutable {
128 [iWait, excpt](std::exception_ptr
const*)
mutable { iWait.
doneWaiting(excpt); });
130 for (
auto& subProcess : iSubProcesses) {
134 for (
auto& subProcess : iSubProcesses) {
144 template <
typename Traits>
147 unsigned int iNStreams,
148 typename Traits::TransitionInfoType& transitionInfo,
150 std::vector<SubProcess>& iSubProcesses,
151 bool cleaningUpAfterException) {
152 for (
unsigned int i = 0;
i < iNStreams; ++
i) {
153 endStreamTransitionAsync<Traits>(
154 iWait, iSchedule,
i, transitionInfo, iToken, iSubProcesses, cleaningUpAfterException);