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

Method push

queue/queue.go:86–99  ·  view source on GitHub ↗
(data interface{})

Source from the content-addressed store, hash-verified

84}
85
86func (q *Queue) push(data interface{}) {
87 n := q.node_pool.Get()
88 n.data = data
89 n.next = nil
90 if q.end == nil {
91 q.head = n
92 q.end = n
93 } else {
94 q.end.next = n
95 q.end = n
96 }
97 q.c++
98 return
99}
100
101func (q *Queue) pop() (interface{}, bool) {
102 if q.head == nil {

Callers 1

PushMethod · 0.80

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected