Hacker News new | ask | show | jobs
by cyphar 3310 days ago
> I think it's unlikely Go will offer much more control over these internals (beyond GOMAXPROCS)

GOMAXPROCS is actually a lie. If you set it to 1, the runtime will still create threads.

1 comments

> 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.

Yeah, 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.