Java – Future.get() multiple invocations

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 return the result of the task.

If the task has failed with an exception, calling get() will throw an ExecutionException each time you call it.

Leave a Comment

techhipbettruvabetnorabahisbahis forumu