code: @Override
      public void execute(Runnable task) {
          // count a new task in process
          tasksInProcess.incrementAndGet();
          try {
              super.execute(task);
          } catch (RuntimeException e) { // specifically handle RejectedExecutionException
              tasksInProcess.decrementAndGet();
              throw e;
          } catch (Error e) {
              tasksInProcess.decrementAndGet();
              throw e;
          }
      }
docs: Before calling super's version of this method, the amount of tasks which are currently in process is first
  incremented.
  
  @see java.util.concurrent.ThreadPoolExecutor#execute(Runnable)