GOMAXPROCS
is the well known (and cargo culted via its runtime.GOMAXPROCS
counterpart), value that controls the number of operating system threads allocated to goroutines in your program.
As of Go 1.5, the default value of GOMAXPROCS
is the number of CPUs (whatever your operating system considers to be a CPU) visible to the program at startup.
note: the number of operating system threads in use by a Go program includes threads servicing cgo calls, thread blocked on operating system calls, and may be larger than the value of GOMAXPROCS
.
Add Comment