Thread Pools are used mostly calling methods in ExecutorService.

The following methods can be used to submit work for execution:

Untitled Database

Once you are done with the Thread Pool you can call shutdown() to terminate the Thread Pool. This executes all pending tasks. To wait for all tasks to execute you can can loop around awaitTermination or isShutdown().