code: private void waitIndexingNotSuspended() {
          boolean suspendedNotified = false;
          synchronized (suspendLock) {
              while (suspend > 0) {
                  if (!suspendedNotified) {
                      suspendedNotified = true;
                  }
                  try {
                      suspendLock.wait();
                  } catch (InterruptedException ex) {
                  }
              }
          }
      }
docs: the indexing can be suspended when a more important task is running: