runOnFXThread

fun runOnFXThread(task: () -> Unit)

Checks if the current thread is the FX Application thread and calls runLater if so, otherwise runs the task.

Parameters

task

the task to execute.