April 2017
Intermediate to advanced
594 pages
25h 15m
English
The Executor framework is a mechanism that allows you to separate thread creation from its execution. It's based on the Executor and ExecutorService interfaces with the ThreadPoolExecutor class that implements both the interfaces. It has an internal pool of threads and provides methods that allow you to send two kinds of tasks and execute them in the pooled threads. These tasks are:
In both cases, you only send the task to the executor. The executor uses one of its pooled threads or creates a new one to execute those tasks. It also decides the moment in which the task ...
Read now
Unlock full access