1 #ifndef FWCore_Framework_DataProxyTemplate_h 2 #define FWCore_Framework_DataProxyTemplate_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 reset()
Resets access to the resource so that added tasks will wait.
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 invalidateCache() override
void add(oneapi::tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
WaitingTaskList taskList_
void prefetchAsyncImpl(WaitingTaskHolder iTask, const EventSetupRecordImpl &iRecord, const DataKey &iKey, EventSetupImpl const *iEventSetupImpl, edm::ServiceToken const &iToken, edm::ESParentContext const &iParent) override
EventSetupRecordKey const & key() const
virtual const DataT * make(const RecordT &, const DataKey &)=0
std::atomic< bool > prefetching_