activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r505274 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/CountDownLatch.cpp
Date Fri, 09 Feb 2007 12:52:18 GMT
Author: tabish
Date: Fri Feb  9 04:52:17 2007
New Revision: 505274

URL: http://svn.apache.org/viewvc?view=rev&rev=505274
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/CountDownLatch.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/CountDownLatch.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/CountDownLatch.cpp?view=diff&rev=505274&r1=505273&r2=505274
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/CountDownLatch.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/concurrent/CountDownLatch.cpp
Fri Feb  9 04:52:17 2007
@@ -29,6 +29,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 CountDownLatch::~CountDownLatch()
 {
+    try {
+
+        synchronized( &mutex ) {
+            mutex.notifyAll();
+        }
+    }
+    AMQ_CATCHALL_NOTHROW()
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -67,6 +74,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 void CountDownLatch::countDown() {
     try {
+
+        if( count == 0 ) {
+            return;
+        }
 
         synchronized( &mutex ) {
             count--;



Mime
View raw message