Urc*_*ase 2 java multithreading executor
的参数beforeExecute()在ThreadPoolExecutor类是线程和Runnable接口.
有时我们可能需要覆盖此方法以满足我们的需求.
但是,当我在执行程序中提交一些可调用的任务时.在这里,beforeExecute()我们只能得到Runnable对象,所以我想知道执行者是否可以隐式地将可调用的表单转换为runnable?
我在Executors类中找到一些实用方法,转换Runnable为Callable,但我没有找到相反的方法.
| 归档时间: |
|
| 查看次数: |
164 次 |
| 最近记录: |