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/MutexTest.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/MutexTest.cpp')
-rw-r--r-- | cpp/test/IceUtil/thread/MutexTest.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cpp/test/IceUtil/thread/MutexTest.cpp b/cpp/test/IceUtil/thread/MutexTest.cpp index 1b463d21c8e..fa3d1ecd36c 100644 --- a/cpp/test/IceUtil/thread/MutexTest.cpp +++ b/cpp/test/IceUtil/thread/MutexTest.cpp @@ -28,7 +28,7 @@ public: MutexTestThread(Mutex& m) : _mutex(m), - _trylock(false) + _tryLock(false) { } @@ -38,33 +38,33 @@ public: test(!tlock.acquired()); { - Mutex::Lock lock(_trylockMutex); - _trylock = true; + Mutex::Lock lock(_tryLockMutex); + _tryLock = true; } - _trylockCond.signal(); + _tryLockCond.signal(); Mutex::Lock lock(_mutex); } void - waitTrylock() + waitTryLock() { - Mutex::Lock lock(_trylockMutex); - while(!_trylock) + Mutex::Lock lock(_tryLockMutex); + while(!_tryLock) { - _trylockCond.wait(lock); + _tryLockCond.wait(lock); } } private: Mutex& _mutex; - bool _trylock; + bool _tryLock; // // Use native Condition variable here, not Monitor. // - Cond _trylockCond; - Mutex _trylockMutex; + Cond _tryLockCond; + Mutex _tryLockMutex; }; typedef Handle<MutexTestThread> MutexTestThreadPtr; @@ -149,8 +149,8 @@ MutexTest::run() t = new MutexTestThread(mutex); control = t->start(); - // TEST: Wait until the trylock has been tested. - t->waitTrylock(); + // TEST: Wait until the tryLock has been tested. + t->waitTryLock(); } // |