Skip to content
Discussion options

You must be logged in to vote

I am not an expert in Future cancellation but I was under the impression that CompletableFuture does NOT propagate a signal upwards to stop a chained CF

re: elements from https://stackoverflow.com/questions/65539126/whats-the-intended-pattern-of-canceling-already-running-completablefutures

and

https://nurkiewicz.com/2015/03/completablefuture-cant-be-interrupted.html

I did some local testing and chained CFs do not interrupt.

It would take a library like say https://github.com/vsilaev/tascalate-concurrent and its "dependent promises" for this to happen I suspect.

But if I am wrong here I am happy to be corrected and guided.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@bbakerman
Comment options

@bbakerman
Comment options

@bclozel
Comment options

@bbakerman
Comment options

@bclozel
Comment options

Answer selected by bclozel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants