public void execute() {

      if (waitTasks.isEmpty()) return;

      lock.readLock().lock();
      
      try {
        for(Runnable runnable : waitTasks) {
          runnable.run();
        }
      } catch (Exception e) {
        // This try catch block enable to free the lock in case of any unexpected error.
      }
      
      waitTasks.clear();
      
      lock.readLock().unlock();
  }
Execute all the tasks that are waiting.
@see #addToExecute(Runnable)
jme3-desktop/src/main/java/com/jme3/system/AWTTaskExecutor.java