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:
parent
3f8e58ad58
commit
c7e15d664a
@ -49,6 +49,6 @@ func main() {
|
|||||||
// finished. An alternative way to wait for multiple
|
// finished. An alternative way to wait for multiple
|
||||||
// goroutines is to use a [WaitGroup](waitgroups).
|
// goroutines is to use a [WaitGroup](waitgroups).
|
||||||
for a := 1; a <= numJobs; a++ {
|
for a := 1; a <= numJobs; a++ {
|
||||||
<-results
|
fmt.Println( <- results )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user