}
ctx := tr.backlogMgr.tqCtx
dispatchLoop:
for ctx.Err() == nil {
if len(tr.taskBuffer) == 0 {
// reset the atomic since we have no tasks from the backlog
tr.backlogHeadCreateTime.Store(-1)
}
select {
case taskInfo, ok := <-tr.taskBuffer:
if !ok { // Task queue getTasks pump is shutdown