code: public void removeListener(Listener listener) {
      queue.remove(listener);
  
      if (queue.isEmpty()) {
        synchronized (queue) {
          if (currentScheduledFrequency.get() > 0 && queue.isEmpty()) {
            currentScheduledFrequency.set(-1);
          }
        }
  
      }
    }
docs: Remove listener to validation list.
  
  @param listener listener