1
0
mirror of https://github.com/golang/go synced 2024-11-26 04:07:59 -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
}
t = &taskDesc{
id: taskID,
goroutines: make(map[uint64]struct{}),
}
t = newTaskDesc(taskID)
tasks[taskID] = t
return t
}