void waitForPendingFilters(long timeoutMs) {
    ThreadingAssertions.assertEventDispatchThread();
    
    long started = System.currentTimeMillis();
    while (true) {
      if (myQueue.isEmpty()) {
        // results are available before queue is emptied, so process the last results, if any, and exit
        highlightAvailableResults();
        return;
      }

      if (hasResults()) {
        highlightAvailableResults();
        continue;
      }

      if (System.currentTimeMillis() - started > timeoutMs) {
        return;
      }
      TimeoutUtil.sleep(1);
    }
  }
void waitForPendingFilters(long timeoutMs)