MCPcopy Index your code
hub / github.com/Cyinx/einx / pop

Method pop

queue/queue.go:101–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99}
100
101func (q *Queue) pop() (interface{}, bool) {
102 if q.head == nil {
103 return nil, false
104 }
105
106 n := q.head
107 data := n.data
108 q.head = n.next
109 if q.head == nil {
110 q.end = nil
111 }
112 q.c--
113 q.node_pool.Put(n)
114 return data, true
115}
116
117func (q *Queue) count() int {
118 return q.c

Callers 2

GetMethod · 0.80
GetOneMethod · 0.80

Calls 1

PutMethod · 0.45

Tested by

no test coverage detected