© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
K. Sharan, P. SpäthLearn JavaFX 17https://doi.org/10.1007/978-1-4842-7848-2_24

24. Understanding Concurrency in JavaFX

Kishori Sharan1   and Peter Späth2
Montgomery, AL, USA
Leipzig, Sachsen, Germany
In this chapter, you will learn:
  • Why you need a concurrency framework in JavaFX

  • How the Worker<V> interface represents a concurrent task

  • How to run a one-time task

  • How to run a reusable task

  • How to run a scheduled task

The examples of this chapter lie in the com.jdojo.concurrent package. In order for them to work, you must add a corresponding line to the module-info.java file:
opens com.jdojo.concurrent to javafx.graphics, javafx.base;

The Need for a Concurrency ...

Get Learn JavaFX 17: Building User Experience and Interfaces with Java 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.