Code example for ThreadPoolExecutor

Methods: shutdown

0
        System.out.printf("Server: Completed Tasks: %d\n",
                executor.getCompletedTaskCount());
    } 
 
    public void endServer() { 
        executor.shutdown();
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java