iterate() now returns false after every run to prevent spinning

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@619652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-02-07 21:42:56 +00:00
parent 939a3160f3
commit 24fea9368c
1 changed files with 2 additions and 5 deletions

View File

@ -895,11 +895,8 @@ public class Queue extends BaseDestination implements Task {
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) {