> If you try really hard, you can simulate pseudo threading by using
> setTimeout. In this respect, you can perform multiple function
> executions in what would seem to be a simultaneous fashion (even
> though you will not get the benefits of true threading by doing so).
I was netdiving this evening and discovered that Firefox 3.5+ and
Safari 4+ (and Chrome nightlies) do support multi-threaded javascript
applications via "Web Workers" where one script delegates work to a
separate OS-level thread.
https://developer.mozilla.org/En/Using_web_workers
http://ejohn.org/blog/web-workers/
Now that I've learned of it, there's some slow code I wrote a few
months ago that I have to revisit, and I think that I might think
about building it to support Workers where available.
|