Update worker-pools.go to print results.

Great example but needs one small change to be complete!  Print the collected values from the results channel.
This commit is contained in:
markhughes248 2020-02-05 14:46:56 -05:00 committed by GitHub
parent 3f8e58ad58
commit c7e15d664a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,6 @@ func main() {
// finished. An alternative way to wait for multiple
// goroutines is to use a [WaitGroup](waitgroups).
for a := 1; a <= numJobs; a++ {
<-results
fmt.Println( <- results )
}
}