mirror of
https://github.com/golang/go
synced 2024-11-22 20:14:40 -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:
parent
e4a4161f1f
commit
c274a7c03b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user