java - Checking whether all tasks in ThreadPoolExecutor are completed -


how can check whether tasks submitted threadpoolexecutor completed?

new tasks can added submitted tasks, can't call shutdown followed awaittermination nor invokeall, ignore these new tasks.

yourthreadpoolexecutor.getactivecount(); return 0 when tasks have completed.


Comments