From 625fd4c333c8e5fa4c4016aab3385dd42c0374d8 Mon Sep 17 00:00:00 2001 From: ipriver Date: Tue, 8 Sep 2020 17:35:15 +0300 Subject: [PATCH 1/2] runtime: updated GOMAXPROCS doc comment --- src/runtime/debug.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/runtime/debug.go b/src/runtime/debug.go index 76eeb2e41afd82..60c03e4f52f20d 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -10,10 +10,8 @@ import ( ) // GOMAXPROCS sets the maximum number of CPUs that can be executing -// simultaneously and returns the previous setting. If n < 1, it does not -// change the current setting. -// The number of logical CPUs on the local machine can be queried with NumCPU. -// This call will go away when the scheduler improves. +// simultaneously and returns the previous setting. It defaults to +// the value of runtime.NumCPU. If n < 1, it does not change the current setting. func GOMAXPROCS(n int) int { if GOARCH == "wasm" && n > 1 { n = 1 // WebAssembly has no threads yet, so only one CPU is possible. From e45c8ac5873979397d747838fd8d41e252aec489 Mon Sep 17 00:00:00 2001 From: ipriver Date: Thu, 10 Sep 2020 13:06:15 +0300 Subject: [PATCH 2/2] returned back scheduler comment line --- src/runtime/debug.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/debug.go b/src/runtime/debug.go index 60c03e4f52f20d..f411b2267660f6 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -12,6 +12,7 @@ import ( // GOMAXPROCS sets the maximum number of CPUs that can be executing // simultaneously and returns the previous setting. It defaults to // the value of runtime.NumCPU. If n < 1, it does not change the current setting. +// This call will go away when the scheduler improves. func GOMAXPROCS(n int) int { if GOARCH == "wasm" && n > 1 { n = 1 // WebAssembly has no threads yet, so only one CPU is possible.