1 #ifndef FWCore_Framework_ESProductResolverTemplate_h 2 #define FWCore_Framework_ESProductResolverTemplate_h 50 namespace eventsetup {
52 template <
class RecordT,
class DataT>
66 assert(iRecord.
key() == RecordT::keyForClass());
67 bool expected =
false;
68 bool doPrefetch =
prefetching_.compare_exchange_strong(expected,
true);
72 iTask.
group()->run([
this, &iRecord, iKey, iEventSetupImpl, iToken, iParent]() {
77 this->
make(rec, iKey);
93 virtual const DataT*
make(
const RecordT&,
const DataKey&) = 0;
void prefetchAsyncImpl(WaitingTaskHolder iTask, const EventSetupRecordImpl &iRecord, const DataKey &iKey, EventSetupImpl const *iEventSetupImpl, edm::ServiceToken const &iToken, edm::ESParentContext const &iParent) override
void invalidateCache() override
void reset()
Resets access to the resource so that added tasks will wait.
WaitingTaskList taskList_
oneapi::tbb::task_group * group() const noexcept
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
void add(oneapi::tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
std::atomic< bool > prefetching_
virtual const DataT * make(const RecordT &, const DataKey &)=0
EventSetupRecordKey const & key() const
ESProductResolverTemplate()