Today is a good day to code

Wish List: Threaded JavaScript Engine

Posted: December 31st, 1969 | Author: | Filed under: Uncategorized | No Comments »

Wish List: Threaded JavaScript Engine

Picture of IrvinI was working with some listeners in JavaScript the other day and was thinking about how to implement a threaded JavaScript engine.

Of course, the difficulty in doing such a thing is in resolving race conditions, etc… Then I thought about easier ways to implement threads. Not every task needs to be threaded, but I think that it would be nice to have setInterval, and setTimeout both spawn new threads. The benefit, of course, would be that one could use more listeners in their application with less cost.

Right now, if I wanted to create listeners for all of the events that my application generates, I'd have a slow AJAX application. It would be better if, since the operations I'd be calling don't need to occur right away, the implementation of those functions was on a different thread. I think this would go a long way to making JavaScript applications, AJAX, Web 2.0, whatever, much less hacky feeling and more application like.