You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The executor shutdown schedules the shutdown after all tasks have been finished. This call is non blocking so we need to do awaitTermination. This call require a timeout. The wait is to ensure processing takes more than the timeout
I see, but the timeout is expected to be provided as a protection to prevent a program from hanging forever if, for some reason, the termination condition cannot be reached.
I'd argue it could be better to avoid the use of the while (!executorService.isTerminated()) loop and eventually use a long timeout interval.
Can you elaborate about the need for a
while
loop in theawaitTermination
method?parallel_data_processor/src/main/java/es/jea/processor/DataProcessingFramework.java
Lines 49 to 51 in 4ed039b
The text was updated successfully, but these errors were encountered: