11 !strcasecmp(getenv(
"CONCURRENCY_CHECK_ENABLE"),
"true");
15 for (
size_t i = 0; i < count; i++) {
25 assert(current != NULL);
31 assert(current == NULL);
41 std::string
Description()
const {
return "ConcurrencyScope::ScopeTask"; }
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
static Task * Running()
Returns a pointer to the current task the code is executing under.
std::string Description() const
void SetRunningTask(int task_id)
boost::scoped_ptr< ScopeTask > unit_test_task_
int GetTaskId(const std::string &name)
static TaskScheduler * GetInstance()
bool Run()
Code to execute. Returns true if task is completed. Return false to reschedule the task...
void SetRunningTask(Task *)
This function should not be called in production code. It is only for unit testing to control current...
ConcurrencyScope(int task_id)
Task is a wrapper over tbb::task to support policies.