If you want to use the same 10 threads, make the ExecutorService with the 10 threads in a scope outside the runnable method of the task being run, then access the Service from inside the scheduled task to schedule the new task.
If you want to make sure the 10 threads in the ExecutorService get shutdown then call service.shutdown() after the 10 tasks are finished being scheduled.
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
global solutions you can do at home or in your backyard