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:
parent
7a50097dec
commit
0720e83840
5
lnd.go
5
lnd.go
@ -21,7 +21,6 @@ import (
|
|||||||
_ "net/http/pprof"
|
_ "net/http/pprof"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -614,10 +613,6 @@ func lndMain() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
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
|
// Call the "real" main in a nested manner so the defers will properly
|
||||||
// be executed in the case of a graceful shutdown.
|
// be executed in the case of a graceful shutdown.
|
||||||
if err := lndMain(); err != nil {
|
if err := lndMain(); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user