github.com/amazechain/amc@v0.1.3/common/crypto/bls/blst/init.go (about) 1 //go:build (android || (linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64)) && !blst_disabled 2 3 package blst 4 5 import ( 6 "runtime" 7 8 blst "github.com/supranational/blst/bindings/go" 9 ) 10 11 func init() { 12 // Reserve 1 core for general application work 13 maxProcs := runtime.GOMAXPROCS(0) - 1 14 if maxProcs <= 0 { 15 maxProcs = 1 16 } 17 blst.SetMaxProcs(maxProcs) 18 }