pool.go
func New(workers int) (pool *Pool) {
	pool = new(Pool)
	pool.num_workers = workers
	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)
	pool.interval = 1
	pool.next_job_id = 0
	// start the supervisor here so we can accept jobs before a Run call
	pool.startSupervisor()
	return
}
func New(workers int) (pool *Pool) {
	pool = new(Pool)
	pool.num_workers = workers
	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)
	pool.interval = 1
	pool.next_job_id = 0
	// start the supervisor here so we can accept jobs before a Run call
	pool.startSupervisor()
	return
}
// New() creates a new Pool.