func (q *pubQueue) Remove() (preparedPub, bool) {
	q.mu.Lock()
	if q.cnt == 0 {
		q.mu.Unlock()
		return preparedPub{}, false
	}
	i := q.nodes[q.head]
	q.head = (q.head + 1) % len(q.nodes)
	q.cnt--
	q.size -= len(i.reply.Data())

	if n := len(q.nodes) / 2; n >= q.initCap && q.cnt <= n {
		q.resize(n)
	}

	q.mu.Unlock()
	return i, true
}
// Remove will remove a preparedPub from the queue.
// If false is returned, it either means 1) there were no items on the queue
// or 2) the queue is closed.
Remove will remove a preparedPub from the queue.
If false is returned, it either means 1) there were no items on the queue
or 2) the queue is closed.
// Remove will remove a preparedPub from the queue . // If false is returned it either means 1 ) there were no items on the queue // or 2 ) the queue is closed .
func (q *pubQueue) Remove() (preparedPub, bool) {
	q.mu.Lock()
	if q.cnt == 0 {
		q.mu.Unlock()
		return preparedPub{}, false
	}
	i := q.nodes[q.head]
	q.head = (q.head + 1) % len(q.nodes)
	q.cnt--
	q.size -= len(i.reply.Data())
	if n := len(q.nodes) / 2; n >= q.initCap && q.cnt <= n {
		q.resize(n)
	}
	q.mu.Unlock()
	return i, true
}
func ( q * pubQueue ) Remove ( ) ( preparedPub , bool ) { q . mu . Lock ( ) if q . cnt == 0 { q . mu . Unlock ( ) return preparedPub { } , false } i := q . nodes [ q . head ] q . head = ( q . head + 1 ) % len ( q . nodes ) q . cnt -- q . size -= len ( i . reply . Data ( ) ) if n := len ( q . nodes ) / 2 ; n >= q . initCap && q . cnt <= n { q . resize ( n ) } q . mu . Unlock ( ) return i , true }
Remove will remove a preparedPub from the queue.
Remove will remove a preparedPub from the queue .