TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Clean web workers using callbacks

1 pointsby mako-tacoover 12 years ago
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.

no comments

no comments