code: protected void checkPausedAndWait() {
  		pauseLock.lock();
  
  		// While the status is paused, keep waiting
  		while (paused) {
  			try {
  				pausedCondition.await();
  			} catch (InterruptedException e) {
  			}
  		}
  
  		pauseLock.unlock();
  	}
docs: Checks whether the scan is paused and, if it is, sleeps until it's resumed. Internally, this
  method makes use of threading synchronization features ({@link ReentrantLock} and
  {@link Condition}) to cause the calling thread to wait, if needed. Thus, it is
  <b>mandatory</b> to eventually call {@link #setPaused(boolean) setPaused(false)} from another
  thread to wake the calling thread.
  
  @see #setPaused(boolean)