activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1100401 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Level.cpp
Date Fri, 06 May 2011 22:04:31 GMT
Author: tabish
Date: Fri May  6 22:04:31 2011
New Revision: 1100401

URL: http://svn.apache.org/viewvc?rev=1100401&view=rev
Log:
Fix, don't create a global Mutex object.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Level.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Level.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Level.cpp?rev=1100401&r1=1100400&r2=1100401&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Level.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Level.cpp Fri May
 6 22:04:31 2011
@@ -32,9 +32,7 @@ using namespace decaf::util::logging;
 
 ////////////////////////////////////////////////////////////////////////////////
 namespace {
-
     std::vector<Level> levels;
-    Mutex levelsLock;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -93,27 +91,27 @@ Level Level::parse( const std::string& n
         isNameAnInt = false;
     }
 
-    synchronized( &levelsLock ) {
-
-        std::vector<Level>::const_iterator level = levels.begin();
-
-        for( ; level != levels.end(); ++level ) {
-            if( name == level->getName() ) {
-                return *level;
-            }
-        }
-
-        // If the name was an int then we loop again to check the int value
-        // against each level's value.
-        if( isNameAnInt ) {
-
-            for( level = levels.begin(); level != levels.end(); ++ level ) {
-                if( nameAsInt == level->intValue()) {
-                    return *level;
-                }
-            }
-        }
-    }
+//    synchronized( &levelsLock ) {
+//
+//        std::vector<Level>::const_iterator level = levels.begin();
+//
+//        for( ; level != levels.end(); ++level ) {
+//            if( name == level->getName() ) {
+//                return *level;
+//            }
+//        }
+//
+//        // If the name was an int then we loop again to check the int value
+//        // against each level's value.
+//        if( isNameAnInt ) {
+//
+//            for( level = levels.begin(); level != levels.end(); ++ level ) {
+//                if( nameAsInt == level->intValue()) {
+//                    return *level;
+//                }
+//            }
+//        }
+//    }
 
     if( !isNameAnInt ) {
         throw IllegalArgumentException(



Mime
View raw message