4 ms·
It is unfortunate that none of the JS VMs have support for concurrency. Event driven programming can get messy (lots of state machines).
by richcollins 17y ago
It is unfortunate that none of the JS VMs have support for concurrency. Event driven programming can get messy (lots of state machines).
- ZitchDog 17y agoIt's usually pretty trivial to create an event bus where you can publish and subscribe to events.
- richcollins 17y agoHow is that equivalent to new threads (stacks) of execution?
- ZitchDog 17y agoIt's nothing to do with concurrency - the event bus pattern will alleviate much of the pain around event-driven programming (the FSM's you were referring to) and decouple the event handling machines. In my experience, moving to an event bus model makes event driven programming very manageable. If the event bus has executors (which it could in v8), it will be parallel to boot.
- warfangle 17y agoOr tail-recursion optimization, for that matter.
- tlrobinson 17y agoRhino does, but it's an order of magnitude slower than SquirrelFish/JavaScriptCore and V8.