mirror of
https://github.com/golang/go
synced 2024-11-23 15:40:06 -07:00
runtime: updated GOMAXPROCS doc comment
This commit is contained in:
parent
f98f3b0c30
commit
625fd4c333
@ -10,10 +10,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// GOMAXPROCS sets the maximum number of CPUs that can be executing
|
// GOMAXPROCS sets the maximum number of CPUs that can be executing
|
||||||
// simultaneously and returns the previous setting. If n < 1, it does not
|
// simultaneously and returns the previous setting. It defaults to
|
||||||
// change the current setting.
|
// the value of runtime.NumCPU. 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.
|
|
||||||
func GOMAXPROCS(n int) int {
|
func GOMAXPROCS(n int) int {
|
||||||
if GOARCH == "wasm" && n > 1 {
|
if GOARCH == "wasm" && n > 1 {
|
||||||
n = 1 // WebAssembly has no threads yet, so only one CPU is possible.
|
n = 1 // WebAssembly has no threads yet, so only one CPU is possible.
|
||||||
|
Loading…
Reference in New Issue
Block a user