func (p *Pool) Do(job Job) bool {
	p.lock.RLock()
	closeCond := p.closeCond
	numIdle := p.numIdle
	numActive := p.numActive
	p.lock.RUnlock()
	if closeCond != nil {
		return false
	}
	if numIdle == 0 && (p.maxActive == 0 || numActive < p.maxActive) {
		p.lock.Lock()
		p.numActive++
		p.numIdle++
		p.lock.Unlock()
		go p.routine()
	}
	p.jobs <- job
	return true
}
Do process a job. If there is no goroutine available and goroutine number already
reach the limitation, it will blocked untile a goroutine is free. Otherwise
create a new goroutine. Return false only if pool already closed
package routinepool
import (
	"sync"
	"github.com/cosiner/gohper/sync2"
)
type Job interface{}
type Pool struct {
	processor func(Job)
	maxIdle   uint64
	maxActive uint64
	lock      sync.RWMutex
	jobs      chan Job
	numIdle   uint64
	numActive uint64
	closeCond *sync2.LockCond
}
func New(processor func(Job), jobBufsize int, maxIdle, maxActive uint64) *Pool {
	p := &Pool{
		processor: processor,
		jobs:      make(chan Job, jobBufsize),
		maxIdle:   maxIdle,
		maxActive: maxActive,
	}
	return p
}
func (p *Pool) Info() (numIdle, numActive uint64) {
	p.lock.RLock()
	numIdle = p.numIdle
	numActive = p.numActive
	p.lock.RUnlock()
	return
}