3 ms·
The html5 web workers is the proposed long term solution: http://ejohn.org/blog/web-workers/ http://ejohn.org/blog/web-workers/ Writing GUI libraries (as the
by silvestrov 17y ago
The html5 web workers is the proposed long term solution: http://ejohn.org/blog/web-workers/ http://ejohn.org/blog/web-workers/
Writing GUI libraries (as the DOM is) which works with multithreaded code is hard, very hard, and often have awful performance.
So realistic solutions need to trade something: use co-operative multitasking or loose access to the DOM.
- geocar 17y agoWell actually, there may be other ways, for example it may be possible to detect conflicts! Run the code in separate threads, and then at the end of the routine (or at synchronization points) check for a conflict. If there was a conflict, re-run the code in-order.