Skip to content

Commit 74f32ee

Browse files
authored
Update README.md
1 parent 61a3651 commit 74f32ee

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

async/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1-
*CompletableFuture* is a tool for asynchronous programming in Java. Asynchronous programming is writing
1+
`Future` is a placeholder for a result of an operation that hasn't finished yet.
2+
Once the operation finishes, the `Future` will contain that result.
3+
4+
Limitations of futures:
5+
6+
* they cannot be manually completed
7+
* no further action on a Future's result without blocking
8+
* multiple Futures cannot be chained or combined
9+
* there is no exception handling construct
10+
11+
`CompletableFuture` was introduced to fix the limitations of `Future`.
12+
13+
`CompletableFuture` is a tool for asynchronous programming in Java. Asynchronous programming is writing
214
non-blocking code by running a task on a separate thread than the main application thread
315
and notifying the main thread about its progress, completion, or failure.

0 commit comments

Comments
 (0)