370558 (1) [Avatar] Offline
#1
In listing 7.28 the New function is trying to initialize the tasks field for a Pool but the struct does not have declared this field
fr4nk (14) [Avatar] Offline
#2
Replace tasks with work in the New function, so the line will be:
work: make(chan Worker),


Also in listing 7.28, the Shutdown function has tasks in it. It should also be replaced with work, so the line looks like:
close(p.work)