while(true) {
Message first;
synchronized(this) {
if(incomingMessageQueue.isEmpty()) return;
first = incomingMessageQueue.getFirst();
if(first.age() < MAX_TIME_ON_INCOMING_QUEUE) return;
incomingMessageQueue.removeFirst();
if(logMINOR) Logger.minor(this, "Cancelling queued item: "+first+" - too long on queue, maybe circular waiting?");
swapsRejectedAlreadyLocked++;
}
long oldID = first.getLong(DMT.UID);