mirror of
https://github.com/golang/go
synced 2024-11-20 04:14:49 -07:00
runtime: clarify that NumCPU returns only available CPUs
Update #11609. Change-Id: Ie363facf13f5e62f1af4a8bdc42a18fb36e16ebf Reviewed-on: https://go-review.googlesource.com/12022 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
91ba0abef1
commit
2de67e9974
@ -31,7 +31,7 @@ func GOMAXPROCS(n int) int {
|
|||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
// NumCPU returns the number of logical CPUs on the local machine.
|
// NumCPU returns the number of logical CPUs usable by the current process.
|
||||||
func NumCPU() int {
|
func NumCPU() int {
|
||||||
return int(ncpu)
|
return int(ncpu)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user