SafetyLock
SafetyLock mySafetyLock(theMessageQueue);
SafetyLock theSafetyLock(theMessageQueue);
SafetyLock theSafetyLock(theMessageQueue);
class SafetyLock {
SafetyLock(BMessageQueue *aMessageQueue) {theMessageQueue = aMessageQueue;}
virtual ~SafetyLock() {if (theMessageQueue != NULL) theMessageQueue->Unlock(); };
SafetyLock theSafetyLock(fLocker);
SafetyLock theSafetyLock(fLocker);
SafetyLock theSafetyLock(fLocker);
SafetyLock theSafetyLock1(fLocker);
SafetyLock theSafetyLock2(&fThread2Lock);
SafetyLock theSafetyLock3(&fThread3Lock);
SafetyLock theSafetyLock1(fLocker);
SafetyLock theSafetyLock1(fLocker);