func (t *T) StopAndWait() {
	t.Stop()
	t.Wait()
}
StopAndWait will notify all processes to shutdown by closing shutdown channel
and wait until all processes be stopped.
package background
import (
	"sync"
)
type shutdown struct {
	shutdown chan struct{}
	finished chan struct{}
}
type T struct {
	sync.WaitGroup
	s []shutdown
}
type Process interface {
	Run(args interface{}, shutdown <-chan struct{})
}
type Processes []Process
func Start(processes Processes, args interface{}) *T {
	register := new(T)
	register.WaitGroup = sync.WaitGroup{}
	register.s = make([]shutdown, len(processes))
	for i, p := range processes {
		shutdown := make(chan struct{})
		finished := make(chan struct{})
		register.s[i].shutdown = shutdown
		register.s[i].finished = finished
		register.Add(1)
		go func(p Process, shutdown <-chan struct{}, finished chan<- struct{}) {
			p.Run(args, shutdown)
			register.Done()
			close(finished)
		}(p, shutdown, finished)
	}
	return register
}
func (t *T) Stop() {
	if nil == t {
		return
	}
	for _, shutdown := range t.s {
		close(shutdown.shutdown)
	}
}