reduced context switches by removing the timeout val that was redundant

This commit is contained in:
jrandom
2004-08-08 01:39:00 +00:00
committed by zzz
parent 4dfcf1c1c8
commit e57c010e3d

View File

@ -701,6 +701,9 @@ public class TCPTransport extends TransportImpl {
PendingMessages rv = null;
while (true) {
synchronized (_msgs) {
if (_msgs.size() <= 0) {
try { _msgs.wait(); } catch (InterruptedException ie) {}
}
if (_msgs.size() > 0) {
for (Iterator iter = _msgs.keySet().iterator(); iter.hasNext(); ) {
Object key = iter.next();
@ -717,7 +720,6 @@ public class TCPTransport extends TransportImpl {
}
}
}
try { _msgs.wait(1000); } catch (InterruptedException ie) {}
}
}