diff options
author | Bernard Normier <bernard@zeroc.com> | 2003-05-16 15:38:25 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2003-05-16 15:38:25 +0000 |
commit | f80e2c27c6b4deb05e4e533092dd90dd449262d1 (patch) | |
tree | e1dc25bfe5c122976677b2a3bcfce6d1ab3683bd /cpp/test/IceUtil/thread/MonitorMutexTest.cpp | |
parent | all timed function now return false on timeout instead of raising an (diff) | |
download | ice-f80e2c27c6b4deb05e4e533092dd90dd449262d1.tar.bz2 ice-f80e2c27c6b4deb05e4e533092dd90dd449262d1.tar.xz ice-f80e2c27c6b4deb05e4e533092dd90dd449262d1.zip |
Renamed trylock, readlock and writelock to tryLock, readLock and writeLock
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(); } // |