1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

[docs update]补充缺失内容

This commit is contained in:
Suaxi 2025-01-01 12:15:51 +08:00 committed by suaxi
parent 9276ac2736
commit f5ffecd541

View File

@ -916,7 +916,7 @@ bothCompleted.thenRunAsync(() -> System.out.println("T3 is executing after T1 an
ThreadUtil.sleep(3000); ThreadUtil.sleep(3000);
``` ```
通过 `CompletableFuture``allOf()`这个静态方法来并行运行 T1 和 T2 。当 T1 和 通过 `CompletableFuture``allOf()` 这个静态方法来并行运行 T1 和 T2当 T1 和 T2 都完成后,再执行 T3。
### ⭐️使用 CompletableFuture有一个任务失败如何处理异常 ### ⭐️使用 CompletableFuture有一个任务失败如何处理异常