runAsync方法 的参数
时间: 2023-08-11 15:08:18 浏览: 79
runAsync方法的参数是一个Runnable对象,该对象包含了需要在异步任务中执行的代码。该方法会创建一个CompletableFuture对象,并在后台线程中执行该Runnable对象的run方法。\[3\]
#### 引用[.reference_title]
- *1* *2* [使用CompletableFuture.runAsync()来完成异步任务](https://blog.csdn.net/m0_46539364/article/details/122529287)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [异步使用completablefuture.runasync(() -> {})方法调用](https://blog.csdn.net/web15185420056/article/details/123220701)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文