3 ms·
> This is what e.g. Haskell does, and Go as well, I think. This is what Erlang does by default, GHC >= 6.12 will do it when using `+RTS -N -RTS` and Go require
by masklinn 15y ago
> This is what e.g. Haskell does, and Go as well, I think.
This is what Erlang does by default, GHC >= 6.12 will do it when using `+RTS -N -RTS` and Go requires explicitly setting GOMAXPROCS, the runtime defaults to single-threaded (as far as I know, GOMAXPROCS still hasn't been retired) and there is no way to have it auto-detect the core count.
- casualsuperman2 15y agoThe current weekly release has (and Go v1 will have) runtime.NumCPU() so you can do runtime.GOMAXPROCS(runtime.NumCPU())
- saucetenuto 15y agoIs that the default? If not, why not?