gen-manifests: inline finish() into wait()
wait() just did finish() and returned errors; no need for two functions.
This commit is contained in:
parent
150d490ba8
commit
d470a3cb3f
1 changed files with 2 additions and 6 deletions
|
|
@ -60,13 +60,8 @@ func (wq *workerQueue) start() {
|
|||
}
|
||||
}
|
||||
|
||||
func (wq *workerQueue) wait() []error {
|
||||
wq.finish()
|
||||
return wq.errors
|
||||
}
|
||||
|
||||
// close all queues and wait for waitgroups
|
||||
func (wq *workerQueue) finish() {
|
||||
func (wq *workerQueue) wait() []error {
|
||||
// close job channel and wait for workers to finish
|
||||
close(wq.jobQueue)
|
||||
wq.workerWG.Wait()
|
||||
|
|
@ -75,6 +70,7 @@ func (wq *workerQueue) finish() {
|
|||
close(wq.msgQueue)
|
||||
close(wq.errQueue)
|
||||
wq.utilWG.Wait()
|
||||
return wq.errors
|
||||
}
|
||||
|
||||
func (wq *workerQueue) startWorker(idx uint32) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue