aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-12-04 23:16:50 -0500
committerBrad Fitzpatrick <bradfitz@golang.org>2015-12-05 20:16:35 +0000
commitc5a94ba24fd0392bab2c5b2404a820dbf6bc7346 (patch)
treea58360d0bd607dfe239fc0ecde6fe7ca66001cae /src/runtime/debug.go
parent025e9b0ca32dd8a2ed5792eeecd8b8aa2ea068a8 (diff)
downloadgo-c5a94ba24fd0392bab2c5b2404a820dbf6bc7346.tar.gz
go-c5a94ba24fd0392bab2c5b2404a820dbf6bc7346.zip
runtime: document that NumCPU does not change
Fixes #11609. Change-Id: I3cf64164fde28ebf739706728b84d8ef5b6dc90e Reviewed-on: https://go-review.googlesource.com/17456 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/debug.go')
-rw-r--r--src/runtime/debug.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/debug.go b/src/runtime/debug.go
index ac61173b7f..0f5936566e 100644
--- a/src/runtime/debug.go
+++ b/src/runtime/debug.go
@@ -35,6 +35,10 @@ func GOMAXPROCS(n int) int {
}
// NumCPU returns the number of logical CPUs usable by the current process.
+//
+// The set of available CPUs is checked by querying the operating system
+// at process startup. Changes to operating system CPU allocation after
+// process startup are not reflected.
func NumCPU() int {
return int(ncpu)
}