diff options
Diffstat (limited to 'cpp/test/IceUtil/thread/MonitorMutexTest.cpp')
-rw-r--r-- | cpp/test/IceUtil/thread/MonitorMutexTest.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cpp/test/IceUtil/thread/MonitorMutexTest.cpp b/cpp/test/IceUtil/thread/MonitorMutexTest.cpp index 7d04267abef..9e8c6a660ef 100644 --- a/cpp/test/IceUtil/thread/MonitorMutexTest.cpp +++ b/cpp/test/IceUtil/thread/MonitorMutexTest.cpp @@ -26,7 +26,7 @@ public: MonitorMutexTestThread(Monitor<Mutex>& m) : _monitor(m), - _trylock(false) + _tryLock(false) { } @@ -36,33 +36,33 @@ public: test(!tlock.acquired()); { - Mutex::Lock lock(_trylockMutex); - _trylock = true; + Mutex::Lock lock(_tryLockMutex); + _tryLock = true; } - _trylockCond.signal(); + _tryLockCond.signal(); Monitor<Mutex>::Lock lock(_monitor); } void - waitTrylock() + waitTryLock() { - Mutex::Lock lock(_trylockMutex); - while(!_trylock) + Mutex::Lock lock(_tryLockMutex); + while(!_tryLock) { - _trylockCond.wait(lock); + _tryLockCond.wait(lock); } } private: Monitor<Mutex>& _monitor; - bool _trylock; + bool _tryLock; // // Use native Condition variable here, not Monitor. // - Cond _trylockCond; - Mutex _trylockMutex; + Cond _tryLockCond; + Mutex _tryLockMutex; }; typedef Handle<MonitorMutexTestThread> MonitorMutexTestThreadPtr; @@ -120,8 +120,8 @@ MonitorMutexTest::run() t = new MonitorMutexTestThread(monitor); control = t->start(); - // TEST: Wait until the trylock has been tested. - t->waitTrylock(); + // TEST: Wait until the tryLock has been tested. + t->waitTryLock(); } // |