1
0
mirror of https://github.com/golang/go synced 2024-11-12 00:30:22 -07:00

cmd/trace: use newTaskDesc to create taskDesc

Change-Id: I9bec8e2c4a9e1b9aa2baf883504200b5674844f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/335609
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Trust: Michael Pratt <mpratt@google.com>
This commit is contained in:
Leonard Wang 2021-07-20 00:05:16 +08:00 committed by Michael Pratt
parent 3001b0abf0
commit cf12b0d1f9

View File

@ -407,10 +407,7 @@ func (tasks allTasks) task(taskID uint64) *taskDesc {
return t return t
} }
t = &taskDesc{ t = newTaskDesc(taskID)
id: taskID,
goroutines: make(map[uint64]struct{}),
}
tasks[taskID] = t tasks[taskID] = t
return t return t
} }