public static < T , U > CompletionStage < U > computeOnFxThread ( final T element , final Function < T , U > compute ) { return CompletableFuture . supplyAsync ( ( ) -> compute . apply ( element ) , Platform :: runLater ) ; }
Asynchronously executes a computing operation on the JavaFX thread .