mirror of
https://github.com/golang/go
synced 2024-11-18 03:34:42 -07:00
cmd/compile/internal/noder: limit the number of goroutine
This commit is contained in:
parent
eeadfa2d38
commit
e4a2d3a11a
@ -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