code: func (bg *Writer) Close() error {
  	if !bg.closed {
  		c := bg.active
  		bg.queue <- c
  		bg.qwg.Add(1)
  		<-bg.waiting
  		c.writeBlock()
  		bg.closed = true
  		close(bg.queue)
  		bg.wg.Wait()
  		if bg.err == nil {
  			_, bg.err = bg.w.Write([]byte(magicBlock))
  		}
  	}
  	return bg.err
  }
docs: // Close closes the Writer, waiting for any pending writes before returning
  // the final error of the Writer.