Java.util.concurrent Executors
Jump to navigation
Jump to search
Internal
Overview
An executor is a mechanism that allows executing tasks on a thread different than the one that submits the task for execution. Executors are preferred to explicitly creating Thread instances. The executor decouples the task submission from the mechanics of how each task will be run, including details of thread use, scheduling, etc.
Difference between Executor and ExecutorService.
The package offers an executor instance factory class ava.util.concurrent.Executors.
Typical Usage
int threadCount = 10; ExecutorService executor = Executors.newFixedThreadPool(threadCount);
The ExecutorService