diff options
Diffstat (limited to 'go/loader/util.go')
-rw-r--r-- | go/loader/util.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/go/loader/util.go b/go/loader/util.go index 0404e99..3b64856 100644 --- a/go/loader/util.go +++ b/go/loader/util.go @@ -19,7 +19,7 @@ import ( // We use a counting semaphore to limit // the number of parallel I/O calls per process. -var sema = make(chan bool, 10) +var ioLimit = make(chan bool, 10) // parseFiles parses the Go source files within directory dir and // returns the ASTs of the ones that could be at least partially parsed, @@ -42,10 +42,10 @@ func parseFiles(fset *token.FileSet, ctxt *build.Context, displayPath func(strin } wg.Add(1) go func(i int, file string) { - sema <- true // wait + ioLimit <- true // wait defer func() { wg.Done() - <-sema // signal + <-ioLimit // signal }() var rd io.ReadCloser var err error |