3 ms·
JavaScript was explicitly designed to use one thread and prevent all kinds of concurrency problems. It requires getting used to, but it's very powerful. Look a
by edwinjm 10y ago
JavaScript was explicitly designed to use one thread and prevent all kinds of concurrency problems. It requires getting used to, but it's very powerful.
Look at this page and tell me the JVM is better: https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/package-summary.html https://docs.oracle.com/javase/7/docs/api/java/util/concurre...
- zigzigzag 10y agoJavascript was never explicitly designed to use one thread: it used one thread because Netscape used one thread. This is back in the 1990s when multicore on the desktop didn't exist and JS execution speed was a non issue. The page you linked to shows a full and complete library of concurrency tools, which you don't have to use if you don't want to. How is this evidence of being worse?
- dahauns 10y agoSure, powerful. As long as you're mainly I/O-bound and shared-nothing. Oh, and your link actually DOES show that the JVM is better. It can give you everything node.js has and then some. If you want to see something like node.js for grown-ups, take a look at Vert.x or Akka (& Frameworks based on it), for example. (Sorry for the snark, it's been a long day...)
- Deinumite 10y agoThat library is probably one of (if not the most) powerful concurrency libraries in existence.