GetSnapshot returns a copy of all tasks in the queue. This is useful for external iteration or processing without holding locks. The returned slice is a snapshot at the time of the call and will not reflect subsequent changes to the queue.
()
| 1078 | // The returned slice is a snapshot at the time of the call and will not reflect |
| 1079 | // subsequent changes to the queue. |
| 1080 | func (q *TaskQueue) GetSnapshot() []task.Task { |
| 1081 | return q.storage.GetSnapshot() |
| 1082 | } |
| 1083 | |
| 1084 | // DeleteFunc runs fn on every task and removes each task for which fn returns false. |
| 1085 | func (q *TaskQueue) DeleteFunc(fn func(task.Task) bool) { |
no outgoing calls