摘要
多线程应用可以通过setinterval、set Timeout等方法来模拟实现,却改变不了单线程设计的本质,也无法做到主线程和子线程间相互独立且不受影响.HTML5的Web Workers是实现多线程编程的一种解决方案,打破了传统的伪多线程的编程模式,真正实现了多线程Web应用的设计和开发,允许开发人员编写能够长时间运行而不会被中断的后台脚本程序,且能保证用对主线程的及时响应,有力提升了脚本程序在后台的执行能力,大大改善了Web应用系统的运行性能,具有较好的应用前景.
Multi- threaded applications can use set- interval,set- Timeout and other methods to simulate,but can not change the nature of the design of single thread,and can not achieve the main thread and thread are independent and not affected by. HTML5 Web Workers is a solution of multi-threaded programming,breaking the traditional pseudo multi-thread programming model,realize the design and development of multi-thread Web applications,allowing developers to write can run for a long time without interruption of the background script,and can ensure the timely response to the main thread,effectively enhance the script in the background of executive ability,greatly improve the performance of Web application system,has a good application prospect.
出处
《郧阳师范高等专科学校学报》
2015年第3期38-41,共4页
Journal of Yunyang Teachers College
基金
郧阳师范高等专科学校2014年重点科研项目(项目编号:2014A01)