New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[html] 第53天 web workers有用过吗?能帮我们解决哪些问题? #207
Comments
提供协程能力,如果有一个比较密集的计算任务,可以放到另一个进程中处理,等处理好了再把结果传回主程,这样主要进程就不会阻塞,页面可以正常渲染和响应 |
补充一点: 可充分利用多核的CPU |
为 JavaScript 创造多线程环境,允许主线程创建 Worker 线程,将一些任务分配给后者运行。 |
|
Js是单线程执行的,H5提出实现多线程:Web Workers(内部代码不能操作DOM因为this不是window)、不能跨域加载js、不是所有浏览器都能支持 |
//绑定接收消息的监听 //发送消息 `
|
第53天 web workers有用过吗?能帮我们解决哪些问题?
The text was updated successfully, but these errors were encountered: