public static <T> boolean trySet(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue) {
    """
	Atomically try to set the given {@link Disposable} on the field if it is null or
	disposes it if the field contains {@link #DISPOSED}.
	
	@param updater the target field updater
	@param holder the target instance holding the field
	@param newValue the disposable to set
	@return true if successful, false otherwise
    """
		if (!updater.compareAndSet(holder, null, newValue)) {
			if (updater.get(holder) == DISPOSED) {
				newValue.dispose();
			}
			return false;
		}
		return true;
	}
public static <T> boolean trySet(AtomicReferenceFieldUpdater<T, Disposable> updater, T holder, Disposable newValue) {
		if (!updater.compareAndSet(holder, null, newValue)) {
			if (updater.get(holder) == DISPOSED) {
				newValue.dispose();
			}
			return false;
		}
		return true;
	}
public static < T > boolean trySet ( AtomicReferenceFieldUpdater < T , Disposable > updater , T holder , Disposable newValue ) { if ( ! updater . compareAndSet ( holder , null , newValue ) ) { if ( updater . get ( holder ) == DISPOSED ) { newValue . dispose ( ) ; } return false ; } return true ; }
Atomically try to set the given {@link Disposable} on the field if it is null or
disposes it if the field contains {@link #DISPOSED}.

@param updater the target field updater
@param holder the target instance holding the field
@param newValue the disposable to set
@return true if successful, false otherwise
Atomically try to set the given { @link Disposable } on the field if it is null or disposes it if the field contains { @link #DISPOSED } .