5 #ifndef SRC_BASE_TASK_ANNOTATIONS_H_
6 #define SRC_BASE_TASK_ANNOTATIONS_H_
12 #include <boost/scoped_ptr.hpp>
39 #define CHECK_CONCURRENCY(...) \
41 if (!ConcurrencyChecker::enable_) break; \
42 const char *_X_array[] = { __VA_ARGS__ }; \
43 ConcurrencyChecker checker( \
44 _X_array, sizeof(_X_array) / sizeof(char *)); \
48 #define CHECK_CONCURRENCY_MAIN_THR() \
50 if (!ConcurrencyChecker::enable_) break; \
51 ConcurrencyChecker checker; \
52 checker.CheckIfMainThr(); \
55 #endif // SRC_BASE_TASK_ANNOTATIONS_H_
static Task * Running()
Returns a pointer to the current task the code is executing under.
void SetRunningTask(int task_id)
boost::scoped_ptr< ScopeTask > unit_test_task_
std::set< int > TaskIdSet
static bool IsInMainThr()
ConcurrencyScope(int task_id)