Limit shutdown time

Report a typo

Replace TODO with an expression that allows waiting for 5 milliseconds for the execution to be completed.

val executor: ExecutorService = Executors.newFixedThreadPool(2)
// submitting tasks

executor.shutdown()
// TODO
Enter a short text
___

Create a free account to access the full topic