@@ -32,7 +32,6 @@ the worker is reset().
32
32
#include " FWCore/Framework/interface/ProductResolverIndexAndSkipBit.h"
33
33
#include " FWCore/Concurrency/interface/WaitingTask.h"
34
34
#include " FWCore/Concurrency/interface/WaitingTaskHolder.h"
35
- #include " FWCore/Concurrency/interface/WaitingTaskWithArenaHolder.h"
36
35
#include " FWCore/Concurrency/interface/WaitingTaskList.h"
37
36
#include " FWCore/MessageLogger/interface/MessageLogger.h"
38
37
#include " FWCore/ServiceRegistry/interface/ActivityRegistry.h"
@@ -267,9 +266,7 @@ namespace edm {
267
266
virtual void itemsToGetForSelection (std::vector<ProductResolverIndexAndSkipBit>&) const = 0;
268
267
virtual bool implNeedToRunSelection () const noexcept = 0;
269
268
270
- virtual void implDoAcquire (EventTransitionInfo const &,
271
- ModuleCallingContext const *,
272
- WaitingTaskWithArenaHolder&) = 0;
269
+ virtual void implDoAcquire (EventTransitionInfo const &, ModuleCallingContext const *, WaitingTaskHolder&&) = 0;
273
270
274
271
virtual void implDoTransformAsync (WaitingTaskHolder,
275
272
size_t iTransformIndex,
@@ -394,12 +391,14 @@ namespace edm {
394
391
ParentContext const &,
395
392
typename T::Context const *) noexcept ;
396
393
397
- void runAcquire (EventTransitionInfo const &, ParentContext const &, WaitingTaskWithArenaHolder&);
394
+ // runAcquire() must take a copy of WaitingTaskHolder
395
+ // see comment in runAcquireAfterAsyncPrefetch() definition
396
+ void runAcquire (EventTransitionInfo const &, ParentContext const &, WaitingTaskHolder);
398
397
399
398
void runAcquireAfterAsyncPrefetch (std::exception_ptr,
400
399
EventTransitionInfo const &,
401
400
ParentContext const &,
402
- WaitingTaskWithArenaHolder ) noexcept ;
401
+ WaitingTaskHolder ) noexcept ;
403
402
404
403
std::exception_ptr handleExternalWorkException (std::exception_ptr iEPtr,
405
404
ParentContext const & parentContext) noexcept ;
@@ -519,7 +518,7 @@ namespace edm {
519
518
typename T::TransitionInfoType const &,
520
519
ServiceToken const &,
521
520
ParentContext const &,
522
- WaitingTaskWithArenaHolder ) noexcept {}
521
+ WaitingTaskHolder ) noexcept {}
523
522
void execute () final {}
524
523
};
525
524
@@ -530,7 +529,7 @@ namespace edm {
530
529
EventTransitionInfo const & eventTransitionInfo,
531
530
ServiceToken const & token,
532
531
ParentContext const & parentContext,
533
- WaitingTaskWithArenaHolder holder) noexcept
532
+ WaitingTaskHolder holder) noexcept
534
533
: m_worker(worker),
535
534
m_eventTransitionInfo (eventTransitionInfo),
536
535
m_parentContext(parentContext),
@@ -545,7 +544,7 @@ namespace edm {
545
544
// to hold the exception_ptr
546
545
std::exception_ptr temp_excptr;
547
546
auto excptr = exceptionPtr ();
548
- // Caught exception is passed to Worker::runModuleAfterAsyncPrefetch(), which propagates it via WaitingTaskWithArenaHolder
547
+ // Caught exception is passed to Worker::runModuleAfterAsyncPrefetch(), which propagates it via WaitingTaskHolder
549
548
CMS_SA_ALLOW try {
550
549
// pre was called in prefetchAsync
551
550
m_worker->emitPostModuleEventPrefetchingSignal ();
@@ -563,12 +562,12 @@ namespace edm {
563
562
info = m_eventTransitionInfo,
564
563
parentContext = m_parentContext,
565
564
serviceToken = m_serviceToken,
566
- holder = m_holder]() {
565
+ holder = std::move ( m_holder) ]() {
567
566
// Need to make the services available
568
567
ServiceRegistry::Operate operateRunAcquire (serviceToken.lock ());
569
568
570
569
std::exception_ptr ptr;
571
- worker->runAcquireAfterAsyncPrefetch (ptr, info, parentContext, holder);
570
+ worker->runAcquireAfterAsyncPrefetch (ptr, info, parentContext, std::move ( holder) );
572
571
});
573
572
return ;
574
573
}
@@ -581,7 +580,7 @@ namespace edm {
581
580
Worker* m_worker;
582
581
EventTransitionInfo m_eventTransitionInfo;
583
582
ParentContext const m_parentContext;
584
- WaitingTaskWithArenaHolder m_holder;
583
+ WaitingTaskHolder m_holder;
585
584
ServiceWeakToken m_serviceToken;
586
585
};
587
586
@@ -1127,7 +1126,7 @@ namespace edm {
1127
1126
auto * group = task.group ();
1128
1127
moduleTask = make_waiting_task (
1129
1128
[this , weakToken, transitionInfo, parentContext, ownRunTask, group](std::exception_ptr const * iExcept) {
1130
- WaitingTaskWithArenaHolder runTaskHolder (
1129
+ WaitingTaskHolder runTaskHolder (
1131
1130
*group, new HandleExternalWorkExceptionTask (this , group, ownRunTask->release (), parentContext));
1132
1131
AcquireTask<T> t (this , transitionInfo, weakToken.lock (), parentContext, runTaskHolder);
1133
1132
t.execute ();
@@ -1154,7 +1153,7 @@ namespace edm {
1154
1153
auto group = task.group ();
1155
1154
if constexpr (T::isEvent_) {
1156
1155
if (hasAcquire ()) {
1157
- WaitingTaskWithArenaHolder runTaskHolder (
1156
+ WaitingTaskHolder runTaskHolder (
1158
1157
*group, new HandleExternalWorkExceptionTask (this , group, moduleTask, parentContext));
1159
1158
moduleTask = new AcquireTask<T>(this , transitionInfo, token, parentContext, std::move (runTaskHolder));
1160
1159
}
0 commit comments