News for hackers. Stuff that matters.
Re:Go concurrency isn't parallelism: Real world lessons with... by dingdingdang on Saturday February 07, 2015 @02:00PM (#9014924)
Yup, here's what I normally use for these situations (posted it in disqus too at end of article):

// Initialize to use all available CPU cores

func init() {

   runtime.GOMAXPROCS(runtime.NumCPU())

}
Re:Go concurrency isn't parallelism: Real world lessons with... by malkia on Saturday February 07, 2015 @02:34PM (#9015049)
Maybe GOMAXPROCS exists so that the number of hw threads that might be spawn by the go application can be controlled in a more system-agnostic way. Without such env varianle, on Windows (for example) you can control this with CPU affinity (and possibly other better ways), but not sure about Linux/OSX/etc. So this kind of deals with it upfront.