Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions pkg/goanalysis/runner_loadingpackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,13 @@ func (lp *loadingPackage) analyzeRecursive(ctx context.Context, cancel context.C
}

func (lp *loadingPackage) analyze(ctx context.Context, cancel context.CancelFunc, loadMode LoadMode, loadSem chan struct{}) {
loadSem <- struct{}{}
defer func() {
<-loadSem
}()

select {
case <-ctx.Done():
return
default:
case loadSem <- struct{}{}:
defer func() {
<-loadSem
}()
}

// Save memory on unused more fields.
Expand Down
Loading