ThreadPoolExecutor 提交参数
时间: 2023-10-17 11:36:38 浏览: 134
ThreadPoolExecutor 提交参数是通过 execute() 方法来实现的。execute() 方法是 java.util.concurrent.Executor 接口中唯一的方法,用于向线程池中提交任务。该方法的参数是实现了 Runnable 接口的任务。提交任务后,线程池会在未来的某一时刻执行该任务。需要注意的是,execute() 方法不能获取任务的返回值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [7000字+24张图带你彻底弄懂线程池.md](https://download.csdn.net/download/u010709330/87934727)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Java线程池ThreadPoolExecutor使用和分析(二) - execute()原理](https://blog.csdn.net/Trust_FreeDom/article/details/103094715)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文