On Fri, Sep 2, 2011 at 11:20 AM, billh2233 <[email protected]> wrote: > I like Node.js's non-blocking IO for performance reasons, though it is > built around a single-threaded model whereas clojure is built around a > multi-core/concurrency model. I wonder if the two concepts can be > combined somehow.
* python lets you combine processes, pre-emptive threads, and coroutines. see the greenlet stuff. * class threads are heavy and context switches suck and that is one reason people don't like them vs. the node.js speeds. however, look at Erlang since it has very low context switching overhead, since it doesn't use OS threads. http://thatclevershark.org/benchmarks.html * theoretically, threads and event-driven styles are duals of each other, or maybe the same thing at some level. http://lamp.epfl.ch/~phaller/doc/haller07actorsunify.pdf http://www.bluishcoder.co.nz/2006/04/unifying-events-and-threads-in-haskell.html sincerely. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
