183
// ForEachTask calls pred on each non-forwarder task. If pred returns true, calls post
184
// and removes the task. pred and post must not call back into taskBTree.
185
>
func (b *taskBTree) ForEachTask(pred func(*internalTask) bool, post func(*internalTask)) {
matcher_data.go
186
>
// Collect first, then delete: we must not mutate the tree mid-iteration.
187
>
var toRemove []*internalTask
188
>
b.tree.Scan(func(task *internalTask) bool {
189
if !task.isPollForwarder() && pred(task) {
190
toRemove = append(toRemove, task)