Add a way to test if the master lock is held by someone else.

This commit is contained in:
JoelKatz
2013-04-12 18:36:03 -07:00
parent 455c73ce4d
commit 3c3f9d3fea

View File

@@ -149,6 +149,13 @@ public:
void run();
void stop();
void sweep();
#ifdef DEBUG
void mustHaveMasterLock() { bool tl = mMasterLock.try_lock(); assert(tl); mMasterLock.unlock(); }
#else
void mustHaveMasterLock() { ; }
#endif
};
extern Application* theApp;