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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Clean web workers using callbacks

1 点作者 mako-taco超过 12 年前
This library is a project I made to make web worker code easier to write and easier to read. As they stand, getting use out of web workers involves writing a series of messages and responses that are not standardized in any way between authors. The library I have created, Ozai, creates a web worker by passing a javascript object literal to its constructor. The result is a client-side object which represents the web worker. Instead of passing arbitrary messages, the author calls functions that are obvious to anyone reading the code, and passes them callbacks to fire when then web worker has completed its job.

暂无评论

暂无评论