main: Stop setting GOMAXPROCS to NumCPU explicitly (#1096)

GOMAXPROCS will be set automatically after Go 1.5. The minimum version
supported at the moment is 1.9, so setting GOMAXPROCS to NumCPU is not
necessary anymore.

References
https://docs.google.com/document/d/1At2Ls5_fhJQ59kDK2DFVhFu3g5mATSXqqV5QrxinasI/edit
https://tip.golang.org/doc/go1.5#introduction
This commit is contained in:
yohei okada 2018-04-18 10:59:23 +09:00 committed by Olaoluwa Osuntokun
parent 7a50097dec
commit 0720e83840

5
lnd.go

@ -21,7 +21,6 @@ import (
_ "net/http/pprof"
"os"
"path/filepath"
"runtime"
"runtime/pprof"
"strings"
"sync"
@ -614,10 +613,6 @@ func lndMain() error {
}
func main() {
// Use all processor cores.
// TODO(roasbeef): remove this if required version # is > 1.6?
runtime.GOMAXPROCS(runtime.NumCPU())
// Call the "real" main in a nested manner so the defers will properly
// be executed in the case of a graceful shutdown.
if err := lndMain(); err != nil {