docs: public void setProgressCallback(ProgressCallback callback, @Nullable Executor executor) {
          boolean shouldInvoke;
          int num;
          boolean mined;
          synchronized (this) {
              this.callback = callback;
              this.progressCallbackExecutor = executor;
              num = this.numSeemPeers;
              mined = this.mined;
              shouldInvoke = numWaitingFor > 0;
          }
          if (shouldInvoke)
              invokeProgressCallback(num, mined);
      }