core/go: use max procs (#4766)

* core/go: use max procs

* update test

* logging
This commit is contained in:
Caleb Doxsey 2023-12-07 09:14:57 -07:00 committed by GitHub
parent 9db828ffd4
commit ce8abde236
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 12 deletions

View file

@ -20,7 +20,7 @@ func Build[T any](
builders ...BuilderFunc[T],
) ([]*T, []error) {
eg, ctx := errgroup.WithContext(ctx)
eg.SetLimit(runtime.NumCPU()/2 + 1)
eg.SetLimit(runtime.GOMAXPROCS(0)/2 + 1)
results := make([]*T, len(builders))
errors := make([]error, len(builders))