func (runner *Runner) StopAndRemoveWorker(id string, abort <-chan struct{}) error {
	w, done, err := runner.workerInfo(id, abort)
	if err != nil {
		return err
	}
	workerErr := Stop(w)

	select {
	case <-abort:
	case <-done:
		return workerErr
	}
	return ErrAborted
}
// StopAndRemoveWorker stops the worker and returns any error reported by
// the worker, waiting for the worker to be no longer known to the runner.
// If it was stopped while waiting, StopAndRemoveWorker will return ErrAborted.
//
// StopAndRemoveWorker returns ErrDead if the runner is not running.
StopAndRemoveWorker stops the worker and returns any error reported by
the worker, waiting for the worker to be no longer known to the runner.
If it was stopped while waiting, StopAndRemoveWorker will return ErrAborted.

StopAndRemoveWorker returns ErrDead if the runner is not running.
// StopAndRemoveWorker stops the worker and returns any error reported by // the worker waiting for the worker to be no longer known to the runner . // If it was stopped while waiting StopAndRemoveWorker will return ErrAborted . // // StopAndRemoveWorker returns ErrDead if the runner is not running .
func (runner *Runner) StopAndRemoveWorker(id string, abort <-chan struct{}) error {
	w, done, err := runner.workerInfo(id, abort)
	if err != nil {
		return err
	}
	workerErr := Stop(w)
	select {
	case <-abort:
	case <-done:
		return workerErr
	}
	return ErrAborted
}
func ( runner * Runner ) StopAndRemoveWorker ( id string , abort <- chan struct { } ) error { w , done , err := runner . workerInfo ( id , abort ) if err != nil { return err } workerErr := Stop ( w ) select { case <- abort : case <- done : return workerErr } return ErrAborted }
StopAndRemoveWorker stops the worker and returns any error reported by
the worker, waiting for the worker to be no longer known to the runner.
StopAndRemoveWorker stops the worker and returns any error reported by the worker waiting for the worker to be no longer known to the runner .