MCPcopy
hub / github.com/arnauddri/algorithms / Shift

Method Shift

data-structures/queue/queue.go:34–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (q *Queue) Shift() (el interface{}) {
35 //q.lock.Lock()
36 //defer q.lock.Unlock()
37
38 el, q.queue = q.queue[0], q.queue[1:]
39 q.len--
40 return
41}
42
43func (q *Queue) Push(el interface{}) {
44 //q.lock.Lock()

Callers 2

TestNewFunction · 0.80
ChangePriorityMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestNewFunction · 0.64