3 ms·
You don't have to build goroutines into the language to have lightweight multithreaded tasks. TBB does this for C++, for example. (Edit: I was mistaken about Ja
by pcwalton 13y ago
You don't have to build goroutines into the language to have lightweight multithreaded tasks. TBB does this for C++, for example. (Edit: I was mistaken about Java here -- apparently it does use OS threads.)
- skybrian 13y agogoroutines are lighter than Java threads, though, so it's still an improvement.
- hugoc 13y agoLightweight Threads, Channels and Actors for the JVM: http://blog.paralleluniverse.co/post/49445260575/quasar-pulsar http://blog.paralleluniverse.co/post/49445260575/quasar-puls...
- jerf 13y agoIf you want to show that the JVM can do that, a better link is probably Akka: http://akka.io/ http://akka.io/ Your link appears to be a guy's personal project, which is great, but akka is from what I gather an industrial-strength implementation. Though as the Node people occasionally point out, it is advantageous to have this sort of thing baked into the language, so that everything done in the language supports the concepts, rather than having a relatively small corner support it. Plus you get Go, instead of Java, which I for one would find an improvement.
- karterk 13y agoActually if one wants to use Akka, one should be using Scala. Akka using Java is a total pain in comparison. Atleast with Scala, one seldom gets the feeling that the library is far from the language semantics.
- pjmlp 13y agoThis is not true, regarding Java. The Java language specification does not require the use of OS threads for Java threads. It all depends which JVM you refer to. The JVMs that make use of green threads follow a similar threading model to Go. Don't mix languages with implementations.