Looks a bit more complex than it needs to be:
pool.job_wanted_pipe = make(chan chan *Job)
pool.done_pipe = make(chan *Job)
pool.add_pipe = make(chan *Job)
pool.result_wanted_pipe = make(chan chan *Job)
pool.jobs_ready_to_run = list.New()
pool.jobs_completed = list.New()
pool.working_wanted_pipe = make(chan chan bool)
pool.stats_wanted_pipe = make(chan chan stats)
pool.worker_kill_pipe = make(chan bool)
pool.supervisor_kill_pipe = make(chan bool)
Also I do not understand the idea of having a dedicated managing
goroutine that shuffles messages between channels.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
golang-nuts...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>