activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r756711 - /activemq/activemq-cpp/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp
Date Fri, 20 Mar 2009 18:59:28 GMT
Author: tabish
Date: Fri Mar 20 18:59:28 2009
New Revision: 756711

URL: http://svn.apache.org/viewvc?rev=756711&view=rev
Log:
More fixes for thread safety issues.

Modified:
    activemq/activemq-cpp/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp

Modified: activemq/activemq-cpp/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp?rev=756711&r1=756710&r2=756711&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp Fri Mar
20 18:59:28 2009
@@ -126,17 +126,16 @@
         std::size_t ix = 0;
 
         for( ; ix < bufferSize && !closing; ++ix ) {
-            
-			if( pos == this->buffer.end() ) {
+
+            if( pos == this->buffer.end() ) {
                 // Wait for more data to come in.
                 wait();
             }
 
             if( !closing && pos != this->buffer.end() ){
                 buffer[ix + offset] = *(pos);
+                ++pos;
             }
-
-			++pos;
         }
 
         if( closing ){
@@ -166,5 +165,3 @@
 
     return ix;
 }
-
-



Mime
View raw message