Which method of `ExecutorService` blocks until all submitted tasks complete?

Java Professional Easy

Java Professional — Easy

Which method of `ExecutorService` blocks until all submitted tasks complete?

Key points

  • `awaitTermination()` waits for all tasks to finish
  • `shutdown()` initiates an orderly shutdown but does not block
  • `stop()` abruptly stops execution, not waiting for tasks to finish

Ready to go further?

Related questions