summaryrefslogtreecommitdiff
path: root/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2003-05-16 15:38:25 +0000
committerBernard Normier <bernard@zeroc.com>2003-05-16 15:38:25 +0000
commitf80e2c27c6b4deb05e4e533092dd90dd449262d1 (patch)
treee1dc25bfe5c122976677b2a3bcfce6d1ab3683bd /cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp
parentall timed function now return false on timeout instead of raising an (diff)
downloadice-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/MonitorRecMutexTest.cpp')
-rw-r--r--cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp b/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp
index 7c64106a215..a437a568ba5 100644
--- a/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp
+++ b/cpp/test/IceUtil/thread/MonitorRecMutexTest.cpp
@@ -26,7 +26,7 @@ public:
MonitorRecMutexTestThread(Monitor<RecMutex>& m) :
_monitor(m),
- _trylock(false)
+ _tryLock(false)
{
}
@@ -37,33 +37,33 @@ public:
test(!tlock.acquired());
{
- Mutex::Lock lock(_trylockMutex);
- _trylock = true;
+ Mutex::Lock lock(_tryLockMutex);
+ _tryLock = true;
}
- _trylockCond.signal();
+ _tryLockCond.signal();
Monitor<RecMutex>::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<RecMutex>& _monitor;
- bool _trylock;
+ bool _tryLock;
//
// Use native Condition variable here, not Monitor.
//
- Cond _trylockCond;
- Mutex _trylockMutex;
+ Cond _tryLockCond;
+ Mutex _tryLockMutex;
};
typedef Handle<MonitorRecMutexTestThread> MonitorRecMutexTestThreadPtr;
@@ -127,8 +127,8 @@ MonitorRecMutexTest::run()
t = new MonitorRecMutexTestThread(monitor);
control = t->start();
- // TEST: Wait until the trylock has been tested.
- t->waitTrylock();
+ // TEST: Wait until the tryLock has been tested.
+ t->waitTryLock();
}
//