Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because that’s one approach to getting the most out of all of those multiple core CPU servers.

For Go that came for free because its Communicating Sequential Processes design does that for you.



Came for free? Go takes advantage of multiple cores by using threads. CSP doesn't magically multiplex your code onto your cores.


> CSP doesn't magically multiplex your code onto your cores

Take a look at this Rob Pike video: http://blog.golang.org/2013/01/concurrency-is-not-parallelis...

Now that video might well be crap, I'll be the first to admit I'm not skill enough to know one way or the other.

But based on that video, it does appear to me that Go does offer some form of multi-core magic and it does appear to come at a minimal cost.


It's not magic. It's threads. Go multiplexes your goroutines onto N OS threads. There are also abstractions in C/C++ (though of course as libs, not part of the language, like in Go) which hide the usage of threads. But there is no magic. If your code is running in parallel, your code is using OS threads.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: