How-To's > How do I use asynchronous processes?
Because JavaFX code is executed on the Event Dispatch Thread, any blocking operation, such as an I/O operation or database access, can hang the user interface. To avoid the possibility of hanging, any potential blocking operations must run on a different thread.
JavaFX provides asynchronous APIs to handle cases in which there can be blocking operations. This means that an application can have multiple tasks running concurrently, with some of the tasks running in the background. The asynchronous task model is implemented with the javafx.async package.
In addition, it is possible to load images in the background by using the backgroundLoading variable in the Image and FXDNode classes. For examples of loading images asynchronously, see the topic How do I work with images?
The following links are some starting points for the asynchronous process task model and javafx.async API:
- JavaFX 1.2 Async

This blog describes thejavafx.asyncpackage in the JavaFX API. - Background Tasks in JavaFX

This blog builds on the previous blog to describe aspects of asynchronous processing in JavaFX technology. - Asynchronicity in JavaFX 1.2

This blog describes the asynchronous task model in JavaFX technology.
Last Updated: January 2010
[Return to How-To's Home]
Do you have comments about this article? We welcome your participation in our community. Please keep your comments civil and on point. You may optionally provide your email address to be notified of repliesyour information is not used for any other purpose. By submitting a comment, you agree to these Terms of Use.