} else if (next.isTerminated()) {  ti.remove();
		public void run() {			try {				while (true) {					LinkedList ll = new LinkedList();					synchronized (pendingRecords) {						try {							pendingRecords.wait();							if (!isAlive())								return;						} catch (InterruptedException ex) {							if (!isAlive())								return;							else								continue;						}						Iterator ti = pendingRecords.iterator();						while (ti.hasNext()) {							PendingRecord next = (PendingRecord) ti.next();							if (next.hasPending()) {								ll.add(next);								ti.remove();							}						}					}					Iterator it = ll.iterator();					while (it.hasNext()) {						PendingRecord next = (PendingRecord) it.next();						next.processPending();					}				}			} finally {				if (LogWriter.needsLogging)					logWriter.logMessage("exitting pendingRecordScanner!!");			}		}