Shutdown asynchronously signals the queue to stop.
()
| 80 | |
| 81 | // Shutdown asynchronously signals the queue to stop. |
| 82 | func (q *ExecQueue) Shutdown() { |
| 83 | q.mu.Lock() |
| 84 | defer q.mu.Unlock() |
| 85 | q.closed = true |
| 86 | if q.cancel != nil { |
| 87 | q.cancel() |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func (q *ExecQueue) initCtxLocked() { |
| 92 | if q.ctx == nil { |