func (p *Pool) Run(w Worker) {
	p.tasks <- w
}
Run submits work to the pool
package work
import (
	log "github.com/sirupsen/logrus"
)
type Worker interface {
	Task()
}
type Pool struct {
	tasks chan Worker
	stop  chan struct{}
}
func New() *Pool {
	return &Pool{
		tasks: make(chan Worker),
		stop:  make(chan struct{}),
	}
}
func (p *Pool) Start() {
	go func() {
		log.Trace("Work pool started")
		for {
			select {
			case w := <-p.tasks:
				go func() {
					log.Trace("Work pool received new task")
					w.Task()
				}()
			case <-p.stop:
				log.Trace("Work pool shutdown completed")
				return
			}
		}
	}()
}