O'Reilly logo

Java 9 Concurrency Cookbook - Second Edition by Javier Fernández González

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required