Thread Executors

In this chapter, we will cover the following topics:

  • Creating a thread executor and controlling its rejected tasks
  • Executing tasks in an executor that returns a result
  • Running multiple tasks and processing the first result
  • Running multiple tasks and processing all the results
  • Running a task in an executor after a delay
  • Running a task in an executor periodically
  • Canceling a task in an executor
  • Controlling a task finishing in an executor
  • Separating the launching of tasks and the processing of their results in an executor

Get Java 9 Concurrency Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.