code: public static void runIntoJATSync(final JRebirthRunnable runnable, final long... timeout) {
          final SyncRunnable sync = new SyncRunnable(runnable);
  
          if (Platform.isFxApplicationThread()) {
              // We are into a JAT so just run it synchronously
              sync.run();
              // Be careful in this case no timeout protection is achieved
          } else {
              // The runnable will be run into the JAT during the next round
              Platform.runLater(sync);
  
              // Wait the end of the runnable execution
              sync.waitEnd(timeout);
          }
      }
docs: Run the task into the JavaFX Application Thread [JAT] <b>Synchronously</b>.
  
  @param runnable the task to run
  @param timeout the optional timeout value after which the thread will be released (default is 1000 ms)