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"; }
std::string Description() const
Gives a description of the task.
bool Run()
Code to execute in a task. Returns true if task is completed. Return false to reschedule the task.
ConcurrencyScope(int task_id)
void SetRunningTask(int task_id)
boost::scoped_ptr< ScopeTask > unit_test_task_
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
int GetTaskId(const std::string &name)
static TaskScheduler * GetInstance()
void SetRunningTask(Task *)
This function should not be called in production code. It is only for unit testing to control current...
Task is a class to describe a computational task within OpenSDN control plane applications....
static Task * Running()
Returns a pointer to the current task the code is executing under.
int task_code_id() const
Returns the code ID of this task.