code: protected boolean runAllTasks() {
          assert inEventLoop();
          boolean fetchedAll;
          boolean ranAtLeastOne = false;
  
          do {
              fetchedAll = fetchFromScheduledTaskQueue();
              if (runAllTasksFrom(taskQueue)) {
                  ranAtLeastOne = true;
              }
          } while (!fetchedAll); // keep on processing until we fetched all scheduled tasks.
  
          if (ranAtLeastOne) {
              lastExecutionTime = ScheduledFutureTask.nanoTime();
          }
          afterRunningAllTasks();
          return ranAtLeastOne;
      }
docs: Poll all tasks from the task queue and run them via {@link Runnable#run()} method.
  
  @return {@code true} if and only if at least one task was run