Push add a node to queue
(node QueueNode)
| 48 | |
| 49 | // Push add a node to queue |
| 50 | func (q *Queue) Push(node QueueNode) { |
| 51 | q.mux.Lock() |
| 52 | defer q.mux.Unlock() |
| 53 | |
| 54 | q.PushWithoutLock(node) |
| 55 | } |
| 56 | |
| 57 | // Pull get a node from queue |
| 58 | // it will add the working count and blocked when there are no node on queue but working count not zero |