Chore: use the number of cpus in parallel make

This commit is contained in:
Dreamacro
2023-03-18 20:19:34 +08:00
parent fcbe2f06cc
commit d808576f98
4 changed files with 18 additions and 4 deletions

14
test/main.go Normal file
View File

@ -0,0 +1,14 @@
package main
import (
"os"
"runtime"
"strconv"
"go.uber.org/automaxprocs/maxprocs"
)
func main() {
maxprocs.Set(maxprocs.Logger(func(string, ...any) {}))
os.Stdout.Write([]byte(strconv.FormatInt(int64(runtime.GOMAXPROCS(0)), 10)))
}