code: func (e *Environment) Cancel(err error) bool {
  	e.mu.Lock()
  	defer e.mu.Unlock()
  
  	if e.canceled {
  		return false
  	}
  	e.canceled = true
  	e.err = err
  	e.cancel()
  
  	if e.stopped {
  		return true
  	}
  
  	e.stopped = true
  	close(e.stopCh)
  	return true
  }
docs: // Cancel cancels the base context.
  //
  // Passed err will be returned by Wait().
  // Once canceled, Go() will not start new goroutines.
  //
  // Note that calling Cancel(nil) is perfectly valid.
  // Unlike Stop(), Cancel(nil) cancels the base context and can
  // gracefully stop goroutines started by Server.Serve or
  // HTTPServer.ListenAndServe.
  //
  // This returns true if the caller is the first that calls Cancel.
  // For second and later calls, Cancel does nothing and returns false.