@Override
	public boolean tryAdvance(Consumer<? super T> action) {
		AtomicReference<T> ref = new AtomicReference<>();
		boolean result;
		synchronized (lock) {
			result = spliterator.tryAdvance(ref::set);
		}
		if (!result) {
			return false;
		}
		action.accept(ref.get());
		return true;
	}
Wraps an unsynchronized spliterator in one that synchronizes on a given object's intrinsic lock,
often the collection that provided the stream or spliterator.

@param <T> the type of elements
Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/database/SynchronizedSpliterator.java