-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
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. |
Beta Was this translation helpful? Give feedback.

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.