summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-04-24 12:26:50 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-04-24 12:26:50 +0000
commit0e9cbcf8efc2f9c521cc26f44b413a59c7d8b085 (patch)
tree9934ed66906ae156a04ec9cb1530de334db11c8d /cpp
parentBug 947 (diff)
downloadice-0e9cbcf8efc2f9c521cc26f44b413a59c7d8b085.tar.bz2
ice-0e9cbcf8efc2f9c521cc26f44b413a59c7d8b085.tar.xz
ice-0e9cbcf8efc2f9c521cc26f44b413a59c7d8b085.zip
Complete fix for bug 947
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/IceUtil/Mutex.h4
-rw-r--r--cpp/include/IceUtil/StaticMutex.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/include/IceUtil/Mutex.h b/cpp/include/IceUtil/Mutex.h
index 13f643f7e29..dad0480a08b 100644
--- a/cpp/include/IceUtil/Mutex.h
+++ b/cpp/include/IceUtil/Mutex.h
@@ -145,7 +145,7 @@ Mutex::tryLock() const
if(_mutex.RecursionCount > 1)
{
LeaveCriticalSection(&_mutex);
- return false;
+ throw ThreadLockedException(__FILE__, __LINE__);
}
return true;
}
@@ -222,7 +222,7 @@ Mutex::tryLock() const
{
_recursionCount++;
unlock();
- return false;
+ throw ThreadLockedException(__FILE__, __LINE__);
}
else
{
diff --git a/cpp/include/IceUtil/StaticMutex.h b/cpp/include/IceUtil/StaticMutex.h
index d0e6878893e..b901895aef5 100644
--- a/cpp/include/IceUtil/StaticMutex.h
+++ b/cpp/include/IceUtil/StaticMutex.h
@@ -169,7 +169,7 @@ StaticMutex::tryLock() const
if(_mutex->RecursionCount > 1)
{
LeaveCriticalSection(_mutex);
- return false;
+ throw ThreadLockedException(__FILE__, __LINE__);
}
return true;
}
@@ -243,7 +243,7 @@ StaticMutex::tryLock() const
{
_recursionCount++;
unlock();
- return false;
+ throw ThreadLockedException(__FILE__, __LINE__);
}
else
{