thread checker macro

This commit is contained in:
Alex Zolotarev 2016-03-10 13:37:38 +03:00 committed by Sergey Yershov
parent b9ea81f3ab
commit 00ccc44622

View file

@ -26,7 +26,8 @@ private:
#if defined(DEBUG)
#define DECLARE_THREAD_CHECKER(threadCheckerName) ThreadChecker threadCheckerName
#define ASSERT_THREAD_CHECKER(threadCheckerName, msg) ASSERT(threadCheckerName.CalledOnOriginalThread(), msg)
#define DECLARE_AND_ASSERT_THREAD_CHECKER(msg) { \
#define DECLARE_AND_ASSERT_THREAD_CHECKER(msg) \
{ \
static const ThreadChecker threadChecker; \
ASSERT(threadChecker.CalledOnOriginalThread(), (msg)); \
}