github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/worker/noopworker.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Copyright 2014 Cloudbase Solutions SRL 3 // Licensed under the AGPLv3, see LICENCE file for details. 4 5 package worker 6 7 func NewNoOpWorker() Worker { 8 return NewSimpleWorker(doNothing) 9 } 10 11 func doNothing(stop <-chan struct{}) error { 12 select { 13 case <-stop: 14 return nil 15 } 16 }