mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
19 lines
292 B
Go
19 lines
292 B
Go
|
// +build linux,amd64 linux,arm64
|
||
|
|
||
|
package blst
|
||
|
|
||
|
import (
|
||
|
"runtime"
|
||
|
|
||
|
blst "github.com/supranational/blst/bindings/go"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
// Reserve 1 core for general application work
|
||
|
maxProcs := runtime.GOMAXPROCS(0) - 1
|
||
|
if maxProcs <= 0 {
|
||
|
maxProcs = 1
|
||
|
}
|
||
|
blst.SetMaxProcs(maxProcs)
|
||
|
}
|