executors
5 tutorials tagged “executors”.
- Callable and Future in JavaCallable is a task that returns a result or throws; Future holds that result until it is ready. Learn submit, get, timeouts, cancel and ExecutionException.
- Executor Framework in JavaThe Executor framework runs tasks on reusable thread pools instead of creating threads by hand. Learn Executor, ExecutorService, Executors and submitting tasks.
- ScheduledExecutorService in JavaScheduledExecutorService runs tasks after a delay or repeatedly. Learn schedule, scheduleAtFixedRate and scheduleWithFixedDelay, and how it improves on Timer.
- Shutting Down Executors CorrectlyExecutors must be shut down so their threads end. Learn shutdown, shutdownNow, awaitTermination, close and the recommended two-phase shutdown pattern.
- Types of Thread Pools in JavaThe Executors class creates fixed, cached, single-thread, scheduled, work-stealing and virtual-thread executors. Learn how each behaves and when to choose it.