TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

An Introduction to HTML 5 Web Workers

67 点作者 Mamady大约 13 年前

2 条评论

franze大约 13 年前
i'm currently a little pissed at webwokers (yeah, i take it personally) that i can't hand them a canvaspixelarray. so basically to use workers for canvasimagemanipulation you have to copy the canvaspixelarray into an uint8array, pass it to the work, get back a uint8array and copy that one back into the imagedata.data canvaspixelarray. oh yeah, the copy actions are of course all in the main thread - so this basically defeats the reason to have webworkers in the first place.
评论 #3666480 未加载
blasterford大约 13 年前
I hope there are simple ways to disable these on browsers.<p>Can't imagine every tab having a load of workers in the background, ending well.<p>One of the pleasant things about javascript is that there are no threads. It's a shame some people have pushed for this API.<p>After all, it's not rocket science for a competent developer to split a long running task into chunks which are periodically run via a timeout, keeping the UI responsive.
评论 #3666241 未加载