What is the purpose of `ExecutorService.shutdown()`?
`shutdown()` immediately stops all tasks and terminates the executor, discarding any remaining tasks in the queue.
Thatâ€™s partially correct. `shutdown()` prevents new tasks from being accepted, but it doesnâ€™t immediately stop ongoing tasks.
Can you explain how tasks that are currently executing are handled during a shutdown?