Java - Future.get() multiple invocations
问题 How does Java's Future.get() behave in the case where it is called multiple times after the task is completed? Does it return the the same result? Or does throw an ExecutionException again and again with the same exception if the computation failed? I can not find anything in the docs about it! 回答1: You can call get() on a Future as often as you like, and it will only block if the task that produces the result has not finished yet. If the task has already finished, it will just immediately