I want to have 3 threads doing a task concurrently and also I want a thread that do a scheduled task over a period of time (runs every 10 secs). But I want when the 3 threads finish to run only once the scheduled task and then I want this thread to terminate.
What is the best way to implement these threads? Is the ExecutorService Interface suitable for this.
I want to have 3 threads doing a task concurrently and also I want
Share
Here an example that I’ve just written: