func (q *BlockingQueue) Capacity() uint64 {
	q.lock.Lock()
	res := uint64(q.store.Size() - q.count)
	q.lock.Unlock()
	return res
}
Capacity returns this current elements remaining capacity, is concurrent safe
package blockingQueues
import (
	"math"
	"sync"
)
type BlockingQueue struct {
	count uint64
	lock *sync.Mutex
	notEmpty *sync.Cond
	notFull *sync.Cond
	writeIndex uint64
	readIndex uint64
	store QueueStore
}
func (q *BlockingQueue) inc(idx uint64) uint64 {
	if idx >= math.MaxUint64 {
		panic("Overflow")
	}
	if 1+idx == q.store.Size() {
		return 0
	} else {
		return idx + 1
	}
}
func (q *BlockingQueue) Size() uint64 {
	q.lock.Lock()
	res := q.count
	q.lock.Unlock()
	return res
}