Skip to content

Commit

Permalink
Bind correct pr to go-routines
Browse files Browse the repository at this point in the history
  • Loading branch information
yarcat committed Sep 9, 2020
1 parent 51c99d3 commit c7983c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions goprocess/gp.go
Expand Up @@ -40,6 +40,7 @@ func FindAll() []P {
sem := make(chan token, concurrencyLimit)
for _, pr := range pss {
sem <- token{}
pr := pr
go func() {
defer func() { <-sem }()
if path, version, agent, ok, err := isGo(pr); err != nil {
Expand Down

0 comments on commit c7983c0

Please sign in to comment.