ScheduleContext_service.cc
Go to the documentation of this file.
2 
6 
7 #include "tbb/task.h"
8 
11 {
12  if (!in_context_.load()) {
13  return ScheduleID{};
14  } // Not in schedule-running context.
15  tbb::task* ct = &tbb::task::self();
16  detail::ScheduleTask* st{nullptr};
17  while (ct != nullptr &&
18  (st = dynamic_cast<detail::ScheduleTask*>(ct)) == nullptr) {
19  ct = ct->parent();
20  }
21  return (st ? st->scheduleID() : ScheduleID());
22 }
23 
24 // ===============================
26 // ===============================
ScheduleID currentScheduleID() const
#define CET_PROVIDE_FILE_PATH()
std::atomic< flag_type > in_context_