Java FutureTask completion check
问题 I have checked Oracle Java API, which gives some info that FutureTask.isDone() but I need to check whether the task has completed or terminated with any error. isDone() method will return even if it completes/terminates. But I need to know whether it's completed or terminated due to some problem. 回答1: If the FutureTask is done, call get() afterwards (can be without any timeout, it should return immediately). It will either return some result or throw: ExecutionException - if the computation