Hi > I want to develop multi core capable JS applications. Even if multi core > support is not all around us today it will be soon enough in the good > engines to think about it in advance. > > What is the best way to go about it and which way is the most > soon-to-be-parallelized candidate?
JavaScript will probably never get threads. Douglas Crockford explains pretty nicely why JavaScript probably never will get threads in his Loopage talk (see ca from 20 min): http://developer.yahoo.com/yui/theater/video.php?v=crockford-loopage JavaScript are getting web-workers in newer browsers (and node.js): https://developer.mozilla.org/En/Using_web_workers You should look into workers if you have time consuming operations which will halt the browsers main event loop. > Extensive usage of web worker threads? How to go about DOM manipulation > from > workers in this case? You do not have access to the DOM inside a worker. The source which spawned the worker must manipulate the DOM (probably based on the result from the web-worker). > Is the async XHRequest single or multi-core? In other words: If I have a > quad core CPU and start 3 XHRequests at once, will the requests and result > callbacks run in parallel threads or serial in the same thread? The XMLHttpRequest Object are handled by the browser. The browser can (is implemented by the browser vendor) probably spawn a XMLHttpRequest in a thread in the background, but this is nothing you've got control over from the JavaScript side. Kind regards Trygve Lie ------------------------------------------------ @trygve_lie | http://www.trygve-lie.com -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
