C # Task.ContinueWith () vs java?

in C #, the Task class has a ContinueWith method, when the task is executed to complete the state, the ContinueWith method will be called, and in JAVA are there any methods like ContinueWith ?

I know guava listenablefuture , but it uses a new thread to wait for the completion of the "task", is C # ContinueWith equal to it?

and JAVA 8 CompletableFuture whenComplete has the same effect, so what's the difference in C # ContinueWith listenablefuture CompletableFuture ?

Thank you!

+5
source share

Source: https://habr.com/ru/post/1269392/


All Articles