Push put the executable task into the queue
(job Jober)
| 67 | |
| 68 | // Push put the executable task into the queue |
| 69 | func (q *Queue) Push(job Jober) { |
| 70 | if atomic.LoadUint32(&q.running) != 1 { |
| 71 | return |
| 72 | } |
| 73 | |
| 74 | q.wg.Add(1) |
| 75 | q.jobQueue <- job |
| 76 | } |
| 77 | |
| 78 | func (q *Queue) GetJobCount() int { |
| 79 | return len(q.jobQueue) |
no outgoing calls