public void run() {
			try {
				while (!interrupted()) {
					Hash h;
					while ((h = pending.take()) != null) {
						handleQueue(h);
					}
				}
			} catch (InterruptedException e) {
			} finally {
				Hash h;
				while ((h = pending.poll()) != null) {
					handleQueue(h);
				}
				if (writeQueue.size() > 0) {
					writeFile();
				}
			}
		}