func (q *Queue) Clean() {
	q.mutex.Lock()
	defer q.mutex.Unlock()
	q.items = make(map[int64]interface{})
	q.ids = make(map[interface{}]int64)
	q.buf = make([]int64, minQueueLen)
}
Removes all elements from queue
package pool
import (
	"math/rand"
	"sync"
)
const minQueueLen = 32
type Queue struct {
	items             map[int64]interface{}
	ids               map[interface{}]int64
	buf               []int64
	head, tail, count int
	mutex             *sync.Mutex
	notEmpty          *sync.Cond
	NotEmpty chan struct{}
}
func NewQueue() *Queue {
	q := &Queue{
		items:    make(map[int64]interface{}),
		ids:      make(map[interface{}]int64),
		buf:      make([]int64, minQueueLen),
		mutex:    &sync.Mutex{},
		NotEmpty: make(chan struct{}, 1),
	}
	q.notEmpty = sync.NewCond(q.mutex)
	return q
}