All Projects β†’ developit β†’ Workerize

developit / Workerize

πŸ—οΈ Run a module in a Web Worker.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Workerize

Useworker
βš›οΈ useWorker() - A React Hook for Blocking-Free Background Tasks
Stars: ✭ 2,233 (-45.98%)
Mutual labels:  web-worker, web-workers
Workly
A really simple way to move a function or class to a web worker. πŸ‹οΈβ€β™€οΈβ†’ πŸ˜„
Stars: ✭ 1,848 (-55.3%)
Mutual labels:  web-worker, web-workers
disrustor
A port of the LMAX Disruptor to Rust
Stars: ✭ 29 (-99.3%)
Mutual labels:  threading
Async Techniques Python Course
Async Techniques and Examples in Python Course
Stars: ✭ 314 (-92.4%)
Mutual labels:  threading
partytown
Relocate resource intensive third-party scripts off of the main thread and into a web worker. πŸŽ‰
Stars: ✭ 3,626 (-12.29%)
Mutual labels:  web-worker
DataStructures Algorithms Java
Collection of data structures and algorithms challenges that I've solved. πŸ’€
Stars: ✭ 12 (-99.71%)
Mutual labels:  threading
Onetbb
oneAPI Threading Building Blocks (oneTBB)
Stars: ✭ 3,284 (-20.56%)
Mutual labels:  threading
psched
Priority-based Task Scheduling for Modern C++
Stars: ✭ 59 (-98.57%)
Mutual labels:  threading
Post Me
πŸ“© Use web Workers and other Windows through a simple Promise API
Stars: ✭ 398 (-90.37%)
Mutual labels:  web-worker
awesome-dotnet-async
A curated list of awesome articles and resources to learning and practicing about async, threading, and channels in .Net platform. πŸ˜‰
Stars: ✭ 84 (-97.97%)
Mutual labels:  threading
Fard
πŸŽƒ Multi thread javascript framework - ε€šηΊΏη¨‹ε°η¨‹εΊεΌ•ζ“Ž
Stars: ✭ 310 (-92.5%)
Mutual labels:  web-worker
LazWebsockets
Websocket Server and Client Library written in Lazarus
Stars: ✭ 51 (-98.77%)
Mutual labels:  threading
Track-Stargazers
Have fun tracking your project's stargazers
Stars: ✭ 38 (-99.08%)
Mutual labels:  threading
Pebble
Multi threading and processing eye-candy.
Stars: ✭ 276 (-93.32%)
Mutual labels:  threading
argobots
Official Argobots Repository
Stars: ✭ 71 (-98.28%)
Mutual labels:  threading
Concurrencpp
Modern concurrency for C++. Tasks, executors, timers and C++20 coroutines to rule them all
Stars: ✭ 340 (-91.78%)
Mutual labels:  threading
dannyAVgleDownloader
ηŸ₯名碲站avgle下載器
Stars: ✭ 27 (-99.35%)
Mutual labels:  threading
ember-artisans
An abstraction layer around using web-workers in Ember.js
Stars: ✭ 21 (-99.49%)
Mutual labels:  web-worker
Task Worklet
Task Worklet: explainer, polyfill and demos.
Stars: ✭ 257 (-93.78%)
Mutual labels:  threading
Via.js
Write JS code that runs in a different context. E.g. use the DOM in a Web Worker.
Stars: ✭ 412 (-90.03%)
Mutual labels:  web-worker

πŸ’– Using Webpack? You want workerize-loader ➑️

workerize

Workerize npm travis

Moves a module into a Web Worker, automatically reflecting exported functions as asynchronous proxies.

  • Bundles a tiny, purpose-built RPC implementation into your app
  • If exported module methods are already async, signature is unchanged
  • Supports synchronous and asynchronous worker functions
  • Works beautifully with async/await
  • Just 800 bytes of gzipped ES3

Install

npm install --save workerize

Usage

Pass either a function or a string containing code.

worker.js:

let worker = workerize(`
	export function add(a, b) {
		// block for half a second to demonstrate asynchronicity
		let start = Date.now();
		while (Date.now()-start < 500);
		return a + b;
	}
`);

(async () => {
	console.log('3 + 9 = ', await worker.add(3, 9));
	console.log('1 + 2 = ', await worker.add(1, 2));
})();

License

MIT License Β© Jason Miller

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].