code: func (cc *ClosingControl) ensureOpen(failIfClosing bool) {
  	assert2(!cc._closed && (!failIfClosing || !cc._closing), "this IndexWriter is closed")
  }
docs: // Used internally to throw an AlreadyClosedError if this IndexWriter
  // has been closed or is in the process of closing.