Chore: use the number of cpus in parallel make
This commit is contained in:
14
test/main.go
Normal file
14
test/main.go
Normal 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)))
|
||||
}
|
Reference in New Issue
Block a user