Make GOMAXPROCS an different setting
This commit is contained in:
parent
a4f6d04bf3
commit
e80593b68e
|
@ -301,14 +301,12 @@ func main() {
|
|||
keypairPath := flag.String("keypair", "", "Path to SSL key file.")
|
||||
sniAddressOption := flag.String("sni", "", "Define SNI address if desired. Empty will serve any requests regardless.")
|
||||
fdlimitOption := flag.Int("fdlimit", 128, "Set file operation and process limit.")
|
||||
goProcs := flag.Int("maxprocs", runtime.NumCPU(), "Set GOMAXPROCS.")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
fdlimit = make(chan bool, *fdlimitOption)
|
||||
|
||||
if *fdlimitOption > runtime.NumCPU()-1 {
|
||||
runtime.GOMAXPROCS(*fdlimitOption)
|
||||
}
|
||||
runtime.GOMAXPROCS(*goProcs)
|
||||
|
||||
var err error
|
||||
|
||||
|
|
Loading…
Reference in a new issue