Minggu, 15 November 2020

Difference between Executor, ExecutorService and Executers class in Java

All three classes Executor, ExecutorService, and Executors are part of Java's Executor framework which provides thread pool facilities to Java applications. Since the creation and management of Threads are expensive and the operating system also imposes restrictions on how many Threads an application can spawn, it's a good idea is to use a pool of threads to execute tasks in parallel, instead of creating a new thread every time a request comes in. This not only improves the response time of the application but also prevent resource exhaustion errors like "java.lang.OutOfMemoryError: unable to create new native thread".

Lorem ipsum is simply dummy text of the printing and typesetting industry.

Comments


EmoticonEmoticon