CompletableFuture 类详解

1.runAsync、supplyAsync、get、join:开启异步任务,获取结果。 // runAsync:没有返回值 CompletableFuture<Void> future = CompletableFuture.runAsync(() -> { System.out.println(
posted @ 2024-04-28 20:07  Yfeil  阅读(42)  评论(0编辑  收藏  举报