aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder/noder.go
diff options
context:
space:
mode:
authorhqpko <whaibin01@hotmail.com>2021-03-30 14:53:24 +0000
committerMatthew Dempsky <mdempsky@google.com>2021-03-30 16:07:38 +0000
commitc274a7c03be7b69d54d3307b954f6a0eb298c860 (patch)
treef4afc5b7127fdad939a99e58be85206bc42eed5b /src/cmd/compile/internal/noder/noder.go
parente4a4161f1f3157550846e1b6bd4fe83aae15778e (diff)
downloadgo-c274a7c03be7b69d54d3307b954f6a0eb298c860.tar.gz
go-c274a7c03be7b69d54d3307b954f6a0eb298c860.zip
cmd/compile/internal/noder: limit the number of goroutine
Change-Id: I7f05108fea351a4895dde6090bf86beb822f2c28 GitHub-Last-Rev: e4a2d3a11aa258f2ddf5e39ab4769883f94e3dab 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>
Diffstat (limited to 'src/cmd/compile/internal/noder/noder.go')
-rw-r--r--src/cmd/compile/internal/noder/noder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/noder/noder.go b/src/cmd/compile/internal/noder/noder.go
index 4c7c9fc322..2c021cc570 100644
--- a/src/cmd/compile/internal/noder/noder.go
+++ b/src/cmd/compile/internal/noder/noder.go
@@ -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)