public boolean set(T newVal, C cause) {
		List<TriConsumer<? super T, ? super T, ? super C>> volatileListeners;
		CompletableFuture<T> promise;
		CompletableFuture<Void> waiter;
		List<WaitUntilFuture<T>> untils = new ArrayList<>();
		T oldVal;
		synchronized (this) {
			oldVal = this.val;
			if (!filterAndSet(newVal, cause)) {
				return false;
			}
			newVal = this.val;

			// Invoke listeners without the lock
			volatileListeners = listeners;
			promise = getAndClearChangePromise();
			waiter = getAndRemoveWaitFor(newVal);
			untils = getAndRemoveUntils(newVal);
		}
		invokeListeners(volatileListeners, oldVal, newVal, cause);
		invokePromise(promise, newVal);
		invokeWaitFor(waiter);
		invokeWaitUntils(untils, newVal);

		return true;
	}
Update this reference to the given value because of the given cause

@param newVal the proposed value (subject to the filter)
@param cause the cause, often {@code null}
@return true if the value of this reference changed (post filter)
Ghidra/Framework/Generic/src/main/java/ghidra/async/AsyncReference.java