github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/worker/noopworker.go (about)

     1  package worker
     2  
     3  func NewNoOpWorker() Worker {
     4  	return NewSimpleWorker(doNothing)
     5  }
     6  
     7  func doNothing(stop <-chan struct{}) error {
     8  	select {
     9  	case <-stop:
    10  		return nil
    11  	}
    12  }