public void dispose(Throwable reason) {
		List<CompletableFuture<?>> toExcept = new ArrayList<>();
		synchronized (this) {
			disposalReason = reason;
			toExcept.addAll(waitsFor.values());
			waitsFor.clear();
			toExcept.addAll(waitsUntil);
			waitsUntil.clear();
			if (changePromise != null) {
				toExcept.add(changePromise);
				changePromise = null;
			}
		}

		DisposedException ex = new DisposedException(reason);
		for (CompletableFuture<?> future : toExcept) {
			future.completeExceptionally(ex);
		}
	}
Clear out the queues of future, completing each exceptionally

@param reason the reason for disposal
Ghidra/Framework/Generic/src/main/java/ghidra/async/AsyncReference.java