mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
19 lines
280 B
Go
19 lines
280 B
Go
// +build linux,amd64
|
|
|
|
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)
|
|
}
|