public static <X, Y> void propagateCancellation(ListenableFuture<? extends X> source, Future<? extends Y> destination, boolean mayInterruptIfRunning) {
    """
	Cancels the destination Future if the source Future is cancelled.
    """
        source.addListener(() -> {
            if (source.isCancelled()) {
                destination.cancel(mayInterruptIfRunning);
            }
        }, directExecutor());
    }
public static <X, Y> void propagateCancellation(ListenableFuture<? extends X> source, Future<? extends Y> destination, boolean mayInterruptIfRunning)
    {
        source.addListener(() -> {
            if (source.isCancelled()) {
                destination.cancel(mayInterruptIfRunning);
            }
        }, directExecutor());
    }
public static < X , Y > void propagateCancellation ( ListenableFuture < ? extends X > source , Future < ? extends Y > destination , boolean mayInterruptIfRunning ) { source . addListener ( ( ) -> { if ( source . isCancelled ( ) ) { destination . cancel ( mayInterruptIfRunning ) ; } } , directExecutor ( ) ) ; }
Cancels the destination Future if the source Future is cancelled.
Cancels the destination Future if the source Future is cancelled .