Question

If I submit some tasks to an Executor using invokeAll, am I guaranteed that the submitted thread sees all the side effects of the task executions, even if I don't call get() on each of the returned Futures?

From a practical point of view, it would seem that this would be a useful guarantee, but I don't see anything in the javadoc.

More precisely, do all actions in the body of a Callable submitted to an executor happen-before the return from the invokeAll() call?

It's annoying to uselessly call get() on each future, when in fact the return type is Void and no exceptions are thrown - all the work in the happens as side-effects.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top