diff options
author | ipriver <g1ran1q@gmail.com> | 2020-09-10 10:08:21 +0000 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2020-09-10 14:44:25 +0000 |
commit | 8098dbb30e3d0d0b4d467f823c4bbdb8dcefc92f (patch) | |
tree | fc20d63e8096e3cacb226b668ad1a11b256b447d | |
parent | 07d19b2597af253ed78ef43ba6e7a49db9a8f4ba (diff) | |
download | go-8098dbb30e3d0d0b4d467f823c4bbdb8dcefc92f.tar.gz go-8098dbb30e3d0d0b4d467f823c4bbdb8dcefc92f.zip |
runtime: update docs for GOMAXPROCS
https://github.com/golang/go/blob/master/doc/effective_go.html#L3211 is used to update the docs comment for `GOMAXPROCS` function.
Fixes #41275
Change-Id: I39f58e93a267c6e9f3ac6638ed51acbe5284ada2
GitHub-Last-Rev: e45c8ac5873979397d747838fd8d41e252aec489
GitHub-Pull-Request: golang/go#41276
Reviewed-on: https://go-review.googlesource.com/c/go/+/253537
Reviewed-by: Keith Randall <khr@golang.org>
-rw-r--r-- | src/runtime/debug.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/debug.go b/src/runtime/debug.go index 76eeb2e41a..f411b22676 100644 --- a/src/runtime/debug.go +++ b/src/runtime/debug.go @@ -10,9 +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. +// 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 { |