In this tutorial I am going to show how to create custom thread pool in Java.
Multi-threaded and multi-process programming is a great way to optimize CPU usage and get things done quickly.
Creation of Threads in Java is a costly IO operation. Therefore it is not advisable to create & destroy thread(s) every often. It is recommended to use pool of threads as per the needs. Thread pool is a collection of threads, which are created to perform certain tasks.