mirror of https://github.com/apache/activemq.git
reduce the number of times the sendSyncs map is accessed.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1482800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0deda2501d
commit
548c19496c
|
@ -800,18 +800,15 @@ public class Queue extends BaseDestination implements Task, UsageListener {
|
|||
|
||||
ArrayList<SendSync> syncs = new ArrayList<SendSync>(orderedWork.size());;
|
||||
sendLock.lockInterruptibly();
|
||||
|
||||
try {
|
||||
for (Transaction tx : orderedWork) {
|
||||
SendSync sync = sendSyncs.get(tx);
|
||||
SendSync sync = sendSyncs.remove(tx);
|
||||
sync.processSend();
|
||||
syncs.add(sync);
|
||||
sendSyncs.remove(tx);
|
||||
}
|
||||
} finally {
|
||||
sendLock.unlock();
|
||||
}
|
||||
|
||||
for (SendSync sync : syncs) {
|
||||
sync.processSent();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue