ZacBlanco commented on code in PR #257:
URL: https://github.com/apache/skywalking-eyes/pull/257#discussion_r2692575993


##########
pkg/header/check.go:
##########
@@ -44,10 +46,18 @@ func Check(config *ConfigHeader, result *Result) error {
                return err
        }
 
+       g := new(errgroup.Group)
+       g.SetLimit(runtime.GOMAXPROCS(0))
+
        for _, file := range fileList {
-               if err := CheckFile(file, config, result); err != nil {
-                       return err
-               }
+               f := file
+               g.Go(func() error {
+                       return CheckFile(f, config, result)
+               })
+       }

Review Comment:
   It is. I didn't look closely enough into the Result struct. I pushed a 
version which adds a mutex to make the Result struct's associated methods 
thread-safe. Accessing the inner slices directly is still not thread-safe but 
the code does not do anything with the slices directly while the concurrent 
checks are happening so I think it should be ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to