docs: public void clear() throws InterruptedException {
      if (thread != null) {
        synchronized (this) {
          if (thread != null) {
            thread.interrupt();
            thread.join();
            thread = null;
            queue.clear();
          }
        }
      }
    }