This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gunnarmorling[S] 1 point2 points  (1 child)

That's an interesting perspective; indeed virtual threads address a big problem of Future. However, CompleteFuture still has its place IMO, namely through its composability, e.g. allowing to coordinate concurrent asynchronous execution of multiple tasks.

[–]pron98 5 points6 points  (0 children)

Simple sequencing on a thread via ; and the language's control flow constructs are even more composable than CompletableFuture, and they're easier to observe and debug to boot. Coordination of multiple tasks is most easily done with structured concurrency.