-
- All Implemented Interfaces:
public final class ApplicationThreadExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> TsyncRunLater(Function0<T> task)Runs the given task on the FX thread and waits for the task to finish, returning any value the task returns. final static <T extends Any> TsyncRunOnFXThread(Function0<T> task)Checks if the current thread is the FX Application thread and calls syncRunLater if so, otherwise runs the task. final static UnitrunOnFXThread(Function0<Unit> task)Checks if the current thread is the FX Application thread and calls runLater if so, otherwise runs the task. -
-
Method Detail
-
syncRunLater
final static <T extends Any> T syncRunLater(Function0<T> task)
Runs the given task on the FX thread and waits for the task to finish, returning any value the task returns. Throws an exception if the task takes more than a given amount of milliseconds.
- Parameters:
task- the task to execute.
-
syncRunOnFXThread
final static <T extends Any> T syncRunOnFXThread(Function0<T> task)
Checks if the current thread is the FX Application thread and calls syncRunLater if so, otherwise runs the task.
- Parameters:
task- the task to execute.
-
runOnFXThread
final static Unit runOnFXThread(Function0<Unit> task)
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.
-
-
-
-