We help IT Professionals succeed at work.

How to find out if all executorservice threads have finished

Rohit Bajaj
Rohit Bajaj asked
on
162 Views
Last Modified: 2017-05-22
Hi,
There is a function process which does the following
        for(i = 0;i<100;i++){
        executorservice.submit(task);
        }
       once all the threads have finished there tasks i want to update a table.. How do i know if all the threads have finished the tasks...As the process function will comeout once the threads have finished the task. so probably i need to put a listener somewhere.

Thanks

Thanks
Comment
Watch Question

CERTIFIED EXPERT

Commented:
Daemon thread?
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.