code: void endOffering(IOException exception) {
      if (closed) {
        return;
      }
  
      // closed should never be set by this method--only the polling side should do it, as it means
      // that the CLOSED marker has been encountered.
  
      if (this.exception == null) {
        this.exception = exception;
      }
  
      // Since this is an unbounded queue, offer() always succeeds.
      queue.offer(CLOSED);
    }
docs: Signals that no more data is available and an exception should be thrown.