private void wrapAndExecute(@NotNull Runnable firstTask, long status) {
    try {
      Runnable command = new ContextAwareRunnable() {
        final AtomicReference<Runnable> currentTask = new AtomicReference<>(firstTask);
        @Override
        public void run() {
          AccessToken token = AppExecutorUtil.propagateContext() ? ThreadContext.resetThreadContext() : AccessToken.EMPTY_ACCESS_TOKEN;
          //noinspection TryFinallyCanBeTryWithResources
          try {
            // This runnable is intended to be used for offloading the queue by executing stored tasks.
            // It means that it shall not possess a thread context,
            // but the executed tasks must have a context.
            if (myChangeThreadName) {
              ConcurrencyUtil.runUnderThreadName(myName, this::executeFirstTaskAndHelpQueue);
            }
            else {
              executeFirstTaskAndHelpQueue();
            }
          }
          finally {
            token.close();
          }
        }

        private void executeFirstTaskAndHelpQueue() {
          Runnable task = currentTask.get();
          do {
            currentTask.set(task);
            doRun(task);
            task = pollOrGiveUp(status);
          }
          while (task != null);
        }

        @Override
        public String toString() {
          return String.valueOf(info(currentTask.get()));
        }
      };
      myBackendExecutor.execute(command);
    }
    catch (Error | RuntimeException e) {
      myStatus.decrementAndGet();
      throw e;
    }
  }
private void wrapAndExecute(@NotNull Runnable firstTask, long status)