code: func (ethash *Ethash) Close() error {
  	var err error
  	ethash.closeOnce.Do(func() {
  		// Short circuit if the exit channel is not allocated.
  		if ethash.exitCh == nil {
  			return
  		}
  		errc := make(chan error)
  		ethash.exitCh <- errc
  		err = <-errc
  		close(ethash.exitCh)
  	})
  	return err
  }
docs: // Close closes the exit channel to notify all backend threads exiting.