(size int)
| 29 | } |
| 30 | |
| 31 | func newQueue(size int) *queue { |
| 32 | return &queue{ |
| 33 | queue: make(chan resultTask, size), |
| 34 | size: 0, |
| 35 | limit: int32(size), |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func (q *queue) get() (resultTask, error) { |
| 40 | timer := time.NewTimer(1 * time.Second) |
no outgoing calls