FxApplicationThread usage with

Thiago Milczarek Sayao thiago.sayao at clamed.com.br
Tue Apr 16 11:14:30 UTC 2019


If you do a database (or any I/O intensive task that blocks)  the call  should be on a Task or Service (which contains a Task).

You can bind to the task return value directly, threads will be handled correctly.

For non I/O intensive tasks you can set values directly.

If you do I/O intensive tasks outside a Task<> or Service<> the UI will block (show a white screen or any non-desirable behaviour).


________________________________
De: openjfx-dev <openjfx-dev-bounces at openjdk.java.net> em nome de Andrew Munn <munn7773 at gmail.com>
Enviado: terça-feira, 16 de abril de 2019 00:03
Para: openjfx-dev at openjdk.java.net
Assunto: FxApplicationThread usage with

I have a table where column values are bound to row objects' properties
like this

   column.setCellValueFactory(ex -> ex.getValue().getSomeProperty());

Should I always call...

   someProperty.setValue(updatedValue);

...in the FxApplicationThread, or does binding it to the TableColumn take
care of dispatching it on the right thread?


More information about the openjfx-dev mailing list