()
| 32 | } |
| 33 | |
| 34 | func (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 | |
| 43 | func (q *Queue) Push(el interface{}) { |
| 44 | //q.lock.Lock() |
no outgoing calls