You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/03/20 19:59:28 UTC
svn commit: r756711 -
/activemq/activemq-cpp/trunk/src/main/decaf/io/BlockingByteArrayInputStream.cpp
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;
}
-
-