git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@473647 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonas B. Lim 2006-11-11 06:09:59 +00:00
parent b75b1ee059
commit 2510b088ad
1 changed files with 3 additions and 0 deletions

View File

@ -856,6 +856,9 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
}
}
}
// yeild here so that a thread trying to stop unconsumedMessages has
// a chance of getting prioritized head of this thread that is in a dispatch loop.
Thread.yield();
} catch (Exception e) {
session.connection.onAsyncException(e);
}