1
0
mirror of https://github.com/golang/go synced 2024-11-11 20:40:21 -07:00

cmd/compile/internal/noder: limit the number of goroutine

Change-Id: I7f05108fea351a4895dde6090bf86beb822f2c28
GitHub-Last-Rev: e4a2d3a11a
GitHub-Pull-Request: golang/go#45289
Reviewed-on: https://go-review.googlesource.com/c/go/+/305869
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
hqpko 2021-03-30 14:53:24 +00:00 committed by Matthew Dempsky
parent e4a4161f1f
commit c274a7c03b

View File

@ -46,8 +46,8 @@ func LoadPackage(filenames []string) {
noders[i] = &p
filename := filename
sem <- struct{}{}
go func() {
sem <- struct{}{}
defer func() { <-sem }()
defer close(p.err)
fbase := syntax.NewFileBase(filename)