implement parallel checksumming

This commit is contained in:
sm
2016-11-16 01:27:24 -08:00
parent b11c4701c3
commit 802792d620
2 changed files with 91 additions and 22 deletions
+2 -2
View File
@@ -95,7 +95,7 @@ func check(files []string) chan error {
results := []<-chan error{}
for w := 0; w < *ngo; w++ {
results = append(results, compute(jobs))
results = append(results, verify(jobs))
}
return merge(results)
@@ -125,7 +125,7 @@ func merge(cs []<-chan error) chan error {
return out
}
func compute(jobs chan work) chan error {
func verify(jobs chan work) chan error {
r := make(chan error)
go func() {
for job := range jobs {