Author: kwall
Date: Fri Oct 7 14:04:46 2016
New Revision: 1763765
URL: http://svn.apache.org/viewvc?rev=1763765&view=rev
Log:
QPID-7453: [Java Broker] Hand off selection task only if connection tasks need
to be processed
This change also prevents iterator garbage if there are no connection tasks to
be done.
Modified:
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
Modified:
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
URL:
http://svn.apache.org/viewvc/qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java?rev=1763765&r1=1763764&r2=1763765&view=diff
==============================================================================
---
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
(original)
+++
qpid/java/trunk/broker-core/src/main/java/org/apache/qpid/server/transport/SelectorThread.java
Fri Oct 7 14:04:46 2016
@@ -330,13 +330,16 @@ class SelectorThread extends Thread
{
clearSelecting();
}
- _workQueue.addAll(connections);
- _workQueue.add(this);
- for (ConnectionProcessor connectionProcessor :
connections)
+
+ if (!connections.isEmpty())
{
- connectionProcessor.processConnection();
+ _workQueue.addAll(connections);
+ _workQueue.add(this);
+ for (ConnectionProcessor connectionProcessor :
connections)
+ {
+ connectionProcessor.processConnection();
+ }
}
-
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]