mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: default GOMAXPROCS to NumCPU(), not 1
See golang.org/s/go15gomaxprocs for details. Change-Id: I8de5df34fa01d31d78f0194ec78a2474c281243c Reviewed-on: https://go-review.googlesource.com/10668 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
14da5bef5f
commit
3ffcbb633e
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ func schedinit() {
|
|||
gcinit()
|
||||
|
||||
sched.lastpoll = uint64(nanotime())
|
||||
procs := 1
|
||||
procs := int(ncpu)
|
||||
if n := atoi(gogetenv("GOMAXPROCS")); n > 0 {
|
||||
if n > _MaxGomaxprocs {
|
||||
n = _MaxGomaxprocs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue