4 ms·
> GOMAXPROCS is actually a lie. If you set it to 1, the runtime will still create threads. It's not a lie. The variable is GOMAXPROCS, not GOMAXTHREADS. "procs
by mappu 9y ago
> GOMAXPROCS is actually a lie. If you set it to 1, the runtime will still create threads.
It's not a lie. The variable is GOMAXPROCS, not GOMAXTHREADS. "procs" is specific jargon of the G:M:P scheduler design.
- cyphar 9y agoYeah, you're correct. Though it doesn't change that it's a deceptively named variable -- you have to read the runtime docs carefully to realise that it only refers to the number of threads concurrently executing Go code.