github.com/prysmaticlabs/prysm@v1.4.4/shared/maxprocs/maxprocs.go (about) 1 // Package maxprocs automatically sets GOMAXPROCS to match the Linux 2 // container CPU quota, if any. This will not override the environment 3 // variable of GOMAXPROCS. 4 package maxprocs 5 6 import ( 7 log "github.com/sirupsen/logrus" 8 "go.uber.org/automaxprocs/maxprocs" 9 ) 10 11 // Initialize Uber maxprocs. 12 func init() { 13 _, err := maxprocs.Set() 14 if err != nil { 15 log.WithError(err).Debug("Failed to set maxprocs") 16 } 17 }