activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r619652 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Date Thu, 07 Feb 2008 21:42:56 GMT
Author: rajdavies
Date: Thu Feb  7 13:42:56 2008
New Revision: 619652

URL: http://svn.apache.org/viewvc?rev=619652&view=rev
Log:
iterate() now returns false after every run to prevent spinning

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=619652&r1=619651&r2=619652&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Thu Feb  7 13:42:56 2008
@@ -895,11 +895,8 @@
             Runnable op = messagesWaitingForSpace.removeFirst();
             op.run();
         }
-
-        synchronized (messages) {
-            result = !messages.isEmpty();
-        }
-        return result;
+        //must return false  to prevent spinning
+        return false;
     }
 
     protected MessageReferenceFilter createMessageIdFilter(final String messageId) {



Mime
View raw message