func (q *pubQueue) resize(n int) {
	nodes := make([]preparedPub, n)
	if q.head < q.tail {
		copy(nodes, q.nodes[q.head:q.tail])
	} else {
		copy(nodes, q.nodes[q.head:])
		copy(nodes[len(q.nodes)-q.head:], q.nodes[:q.tail])
	}

	q.tail = q.cnt % n
	q.head = 0
	q.nodes = nodes
}
// Write mutex must be held when calling.
Write mutex must be held when calling.
// Write mutex must be held when calling .
func (q *pubQueue) resize(n int) {
	nodes := make([]preparedPub, n)
	if q.head < q.tail {
		copy(nodes, q.nodes[q.head:q.tail])
	} else {
		copy(nodes, q.nodes[q.head:])
		copy(nodes[len(q.nodes)-q.head:], q.nodes[:q.tail])
	}
	q.tail = q.cnt % n
	q.head = 0
	q.nodes = nodes
}
func ( q * pubQueue ) resize ( n int ) { nodes := make ( [ ] preparedPub , n ) if q . head < q . tail { copy ( nodes , q . nodes [ q . head : q . tail ] ) } else { copy ( nodes , q . nodes [ q . head : ] ) copy ( nodes [ len ( q . nodes ) - q . head : ] , q . nodes [ : q . tail ] ) } q . tail = q . cnt % n q . head = 0 q . nodes = nodes }
Write mutex must be held when calling.
Write mutex must be held when calling .