From 0720e83840820e68db3565200ed27fe60c0df652 Mon Sep 17 00:00:00 2001 From: yohei okada Date: Wed, 18 Apr 2018 10:59:23 +0900 Subject: [PATCH] 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 --- lnd.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lnd.go b/lnd.go index ce6ee7f0..2afcc727 100644 --- a/lnd.go +++ b/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 {