3 ms·
Question re: only utilizing one CPU and GOMAXPROCS: would it be in bad taste to, by default, for a program which might be used by other people (and uses gorouti
by mvzink 14y ago
Question re: only utilizing one CPU and GOMAXPROCS: would it be in bad taste to, by default, for a program which might be used by other people (and uses goroutines extensively) to include in initialization "runtime.GOMAXPROCS(runtime.NumCPU())"?
- carbocation 14y agoI asked this on the freenode #go-nuts channel. The consensus was no. 1) Not every program benefits from this. 2) It's hoped that this will be deprecated soon hopefully.
- wmf 14y agoC or Java programs use all cores by default. I think it's reasonable for Go to have the same default.
- jlgreco 14y agoC, previous to C11, didn't even have a concept of threading... (And who the hell is using C11 like that anyway?)
- wmf 14y agoOK, pthreads.
- jlgreco 14y agoIt is going to be a pretty hard sell that mimicking pthreads is ever a good idea... Regardless, considering the casual nature of goroutines and the deliberate heavy-weight nature of pthreads, I find it hard to see pthreads as being any sort of argument about what Go should do, regardless of pthreads' shortcomings. They are wildly different animals.