reactor-core/src/main/java/reactor/core/publisher/Operators.java
public static <T> long produced(AtomicLongFieldUpdater<T> updater, T instance, long toSub) {
		long r, u;
		do {
			r = updater.get(instance);
			if (r == 0 || r == Long.MAX_VALUE) {
				return r;
			}
			u = subOrZero(r, toSub);
		} while (!updater.compareAndSet(instance, r, u));

		return u;
	}
public static <T> long produced(AtomicLongFieldUpdater<T> updater, T instance, long toSub) {
		long r, u;
		do {
			r = updater.get(instance);
			if (r == 0 || r == Long.MAX_VALUE) {
				return r;
			}
			u = subOrZero(r, toSub);
		} while (!updater.compareAndSet(instance, r, u));

		return u;
	}
Concurrent subtraction bound to 0, mostly used to decrement a request tracker by
the amount produced by the operator. Any concurrent write will "happen before"
this operation.

@param <T> the parent instance type
@param updater  current field updater
@param instance current instance to update
@param toSub    delta to subtract
@return value after subtraction or zero