code: public static void runIntoJTPSync(final JRebirthRunnable runnable, final long... timeout) {
          final SyncRunnable sync = new SyncRunnable(runnable);
  
          if (JRebirth.isJTPSlot()) {
              // We are into a JTP slot 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 JTP slot during the next round
              JRebirthThread.getThread().runIntoJTP(sync);
              // Wait the end of the runnable execution
              sync.waitEnd(timeout);
          }
      }
docs: Run into the JRebirth Thread Pool [JTP] <b>Synchronously</b>.
  
  Be careful this method can be called through any thread.
  
  @param runnable the task to run
  @param timeout the optional timeout value after which the thread will be released (default is 1000 ms)