MCPcopy Create free account
hub / github.com/EdgeSecurityTeam/EHole / Pop

Method Pop

module/queue/queue.go:32–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32func (q *Queue) Pop() interface{} {
33 q.l.Lock()
34 defer q.l.Unlock()
35 iter := q.data.Back()
36 if nil == iter {
37 return nil
38 }
39 v := iter.Value
40 q.data.Remove(iter)
41 return v
42}
43
44//返回pop列表和实际长度
45func (q *Queue) Pops(num int) ([]interface{}, int) {

Callers 2

TestFunction · 0.95
fingerScanMethod · 0.80

Calls 1

RemoveMethod · 0.80

Tested by 1

TestFunction · 0.76