ExecutorService never restarts Thread. A thread can never be restarted.
ExecutorService is a thread pool. It manages a set of long threads, and each thread is capable of performing many tasks.
es.submit(r) ExeuctorService, es Runnable, r; submit runnable .
, ExecutorService, run(), :
public void run() {
while (true) {
Runnable task = queue.take();
task.run();
}
}
, , - - shutdown(), . , .