MCPcopy
hub / github.com/redis/go-redis / dequeue

Method dequeue

internal/pool/want_conn.go:88–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86}
87
88func (q *wantConnQueue) dequeue() (*wantConn, bool) {
89 q.mu.Lock()
90 defer q.mu.Unlock()
91
92 if len(q.items) == 0 {
93 return nil, false
94 }
95
96 item := q.items[0]
97 q.items = q.items[1:]
98 return item, true
99}
100
101func (q *wantConnQueue) discardDoneAtFront() int {
102 q.mu.Lock()

Calls

no outgoing calls