code: protected boolean confirmShutdown() {
          if (!isShuttingDown()) {
              return false;
          }
  
          if (!inEventLoop()) {
              throw new IllegalStateException("must be invoked from an event loop");
          }
  
          cancelScheduledTasks();
  
          if (gracefulShutdownStartTime == 0) {
              gracefulShutdownStartTime = ScheduledFutureTask.nanoTime();
          }
  
          if (runAllTasks() || runShutdownHooks()) {
              if (isShutdown()) {
                  // Executor shut down - no new tasks anymore.
                  return true;
              }
  
              // There were tasks in the queue. Wait a little bit more until no tasks are queued for the quiet period or
              // terminate if the quiet period is 0.
              // See https://github.com/netty/netty/issues/4241
              if (gracefulShutdownQuietPeriod == 0) {
                  return true;
              }
              wakeup(true);
              return false;
          }
  
          final long nanoTime = ScheduledFutureTask.nanoTime();
  
          if (isShutdown() || nanoTime - gracefulShutdownStartTime > gracefulShutdownTimeout) {
              return true;
          }
  
          if (nanoTime - lastExecutionTime <= gracefulShutdownQuietPeriod) {
              // Check if any tasks were added to the queue every 100ms.
              // TODO: Change the behavior of takeTask() so that it returns on timeout.
              wakeup(true);
              try {
                  Thread.sleep(100);
              } catch (InterruptedException e) {
                  // Ignore
              }
  
              return false;
          }
  
          // No tasks were added for last quiet period - hopefully safe to shut down.
          // (Hopefully because we really cannot make a guarantee that there will be no execute() calls by a user.)
          return true;
      }
docs: Confirm that the shutdown if the instance should be done now!