summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/IceUtil/Lock.h')
-rw-r--r--cpp/include/IceUtil/Lock.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/include/IceUtil/Lock.h b/cpp/include/IceUtil/Lock.h
index d2eaf8664eb..943a816d46c 100644
--- a/cpp/include/IceUtil/Lock.h
+++ b/cpp/include/IceUtil/Lock.h
@@ -25,9 +25,9 @@ class Cond;
// LockT and TryLockT are the preferred construct to lock/tryLock/unlock
// simple and recursive mutexes. You typically allocate them on the
// stack to hold a lock on a mutex.
-// LockT and TryLockT are not recursive: you cannot acquire several times
+// LockT and TryLockT are not recursive: you cannot acquire several times
// in a row a lock with the same Lock or TryLock object.
-//
+//
// We must name this LockT instead of Lock, because otherwise some
// compilers (such as Sun C++ 5.4) have problems with constructs
// such as:
@@ -42,7 +42,7 @@ template <typename T>
class LockT
{
public:
-
+
LockT(const T& mutex) :
_mutex(mutex)
{
@@ -57,7 +57,7 @@ public:
_mutex.unlock();
}
}
-
+
void acquire() const
{
if (_acquired)
@@ -93,9 +93,9 @@ public:
{
return _acquired;
}
-
+
protected:
-
+
// TryLockT's contructor
LockT(const T& mutex, bool) :
_mutex(mutex)
@@ -104,7 +104,7 @@ protected:
}
private:
-
+
// Not implemented; prevents accidental use.
//
LockT(const LockT&);