mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: eliminate GOMAXPROCS limit
Now that allp is dynamically allocated, there's no need for a hard cap on GOMAXPROCS. Fixes #15131. Change-Id: I53eee8e228a711a818f7ebce8d9fd915b3865eed Reviewed-on: https://go-review.googlesource.com/45574 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
84d2c7ea83
commit
ee55000f6c
3 changed files with 1 additions and 13 deletions
|
|
@ -15,9 +15,6 @@ import (
|
|||
// 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 {
|
||||
if n > _MaxGomaxprocs {
|
||||
n = _MaxGomaxprocs
|
||||
}
|
||||
lock(&sched.lock)
|
||||
ret := int(gomaxprocs)
|
||||
unlock(&sched.lock)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue