Adds some TODOs and small fixes to pkg/util/workqueue

Adds a new unit test for queue.
This commit is contained in:
Joe Beda
2016-10-21 18:29:36 -07:00
parent e0c6bf13b1
commit 16b3485817
5 changed files with 46 additions and 5 deletions

View File

@@ -33,6 +33,10 @@ func Parallelize(workers, pieces int, doWorkPiece DoWorkPieceFunc) {
}
close(toProcess)
if pieces < workers {
workers = pieces
}
wg := sync.WaitGroup{}
wg.Add(workers)
for i := 0; i < workers; i++ {