1
0
mirror of https://github.com/golang/go synced 2024-11-18 01:04:48 -07:00

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

This commit is contained in:
hqpko 2021-03-30 11:16:34 +08:00
parent eeadfa2d38
commit e4a2d3a11a

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)