func (q *Queue) Len() (_, _ int) {
	return q.count, len(q.buffer)
}
Count returns the number of currently executing tasks and the number of tasks waiting to be executed
package queue
import (
	"runtime"
	"sync"
)
type queue struct {
	Handler          func(interface{})
	ConcurrencyLimit int
	push             chan interface{}
	pop              chan struct{}
	suspend          chan bool
	suspended        bool
	stop             chan struct{}
	stopped          bool
	buffer           []interface{}
	count            int
	wg               sync.WaitGroup
}
type Queue struct {
	*queue
}
type Handler func(interface{})
func NewQueue(handler Handler, concurrencyLimit int) *Queue {
	q := &Queue{
		&queue{
			Handler:          handler,
			ConcurrencyLimit: concurrencyLimit,
			push:             make(chan interface{}),
			pop:              make(chan struct{}),
			suspend:          make(chan bool),
			stop:             make(chan struct{}),
		},
	}
	go q.run()
	runtime.SetFinalizer(q, (*Queue).Stop)
	return q
}
func (q *Queue) Push(val interface{}) {
	q.push <- val
}
func (q *Queue) Stop() {
	q.stop <- struct{}{}
	runtime.SetFinalizer(q, nil)
}
func (q *Queue) Wait() {
	q.wg.Wait()
}