func (queue *Queue) Capacity() int {
	queue.mutex.Lock()
	defer queue.mutex.Unlock()
	return queue.capacity
}
Capacity returns the capacity of the queue.
package queue
import (
	"sync"
)
type Queue struct {
	ringBuffer []interface{}
	read       int
	write      int
	capacity   int
	size       int
	mutex      sync.Mutex
}
func New(capacity int) *Queue {
	return &Queue{
		ringBuffer: make([]interface{}, capacity),
		capacity:   capacity,
	}
}
func (queue *Queue) Size() int {
	queue.mutex.Lock()
	defer queue.mutex.Unlock()
	return queue.size
}