mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
e4a4161f1f
commit
c274a7c03b
1 changed files with 1 additions and 1 deletions
|
|
@ -46,8 +46,8 @@ func LoadPackage(filenames []string) {
|
|||
noders[i] = &p
|
||||
|
||||
filename := filename
|
||||
go func() {
|
||||
sem <- struct{}{}
|
||||
go func() {
|
||||
defer func() { <-sem }()
|
||||
defer close(p.err)
|
||||
fbase := syntax.NewFileBase(filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue