使用ThreadPoolExedcutor自定义线程池时,如何控制线程池中任务的执行时间?例如,当任务执行时间超过1分钟就取消该线程。(ps:除Future外)
ThreadPoolExedcutor
Future
哪位有好的解决方案?
awaitTermination这个设置不可以么