code: @VisibleForTesting
      public int getCurrentTaskCount() {
          synchronized (this.queue) {
              int size = this.queue.size() + this.filterQueue.size();
              if (size > 0) {
                  // Some tasks may have completed, but we haven't yet been able to clean them up.
                  size -= this.queue.values().stream().filter(CompletableFuture::isDone).count();
                  size -= this.filterQueue.values().stream().filter(CompletableFuture::isDone).count();
              }
  
              return size;
          }
      }
docs: Gets the number of concurrent tasks currently executing.
  @return task count