void itemProcessed(FutureTaskMonitor<I, R> task, QResult<I, R> result) {
		if (itemListener != null) {
			itemListener.itemProcessed(result);
		}
		lock.lock();
		try {
			taskSet.remove(task);
			if (collectResults) {
				resultList.add(result);
			}
			tracker.inProgressItemCompletedOrCancelled();
			fillOpenProcessingSlots();

			if (result.hasError() && unhandledException == null) {
				unhandledException = result.getError();
			}
		}
		finally {
			lock.unlock();
		}

		QProgressListener<I> listener = progressListener;
		if (listener != null) {
			listener.taskEnded(task.getID(), task.getItem(), tracker.getTotalItemCount(),
				tracker.getCompletedItemCount());
		}
	}
Cancels all running tasks and disposes of the internal thread pool if it is a private
pool.
Ghidra/Framework/Generic/src/main/java/generic/concurrent/ConcurrentQ.java