Does a Future timeout kill the Thread execution

后端 未结 4 441
一个人的身影
一个人的身影 2020-12-23 08:55

When using an ExecutorService and Future objects (when submitting Runnable tasks), if I specify a timeout value to the future\'s get f

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 09:27

    It seems that you need to kill, cancel or shutdown the task explicitly

    Handling exceptions from Java ExecutorService tasks

    How do I get FutureTask to return after TimeoutException?

提交回复
热议问题