back to home

poolifier / poolifier-web-worker

Fast and small web worker pool

62 stars
2 forks
2 issues
JavaScriptTypeScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing poolifier/poolifier-web-worker in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/poolifier/poolifier-web-worker)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Deno, Bun and browser Web Worker Pool Why Poolifier? Poolifier is used to perform CPU and/or I/O intensive tasks on Deno, Bun or browser, it implements worker pools using web worker API module.\ With poolifier you can improve your **performance** and resolve problems related to the event loop.\ Moreover you can execute your tasks using an API designed to improve the **developer experience**.\ Please consult our general guidelines. • Easy to use ✔ • Fixed and dynamic pool size ✔ • Easy switch from a pool type to another ✔ • Performance benchmarks ✔ • Multiple JS runtime support at zero cost abstraction ✔ • No runtime dependencies ✔ • Support for ESM and TypeScript ✔ • Support for web worker API module ✔ • Tasks distribution strategies ✔ • Lockless tasks queueing ✔ • Queued tasks rescheduling: • Task stealing on idle ✔ • Tasks stealing under back pressure ✔ • Tasks redistribution on worker error ✔ • Support for sync and async task function ✔ • Support for abortable task function ✔ • Support for multiple task functions: • Queuing priority ✔ • Tasks distribution strategy ✔ • Worker node affinity ✔ • CRUD operations at runtime ✔ • General guidelines on pool choice ✔ • Error handling out of the box ✔ • Widely tested ✔ • Active community ✔ • Code quality • Code security Table of contents • Overview • Usage • Deno • Bun • Browser • Example code • Deno and Bun versions • API • General guidelines • Worker choice strategies • Contribute • Team • License Overview Poolifier contains web worker pool implementation, you don't have to deal with web worker API complexity.\ The first implementation is a fixed worker pool, with a defined number of workers that are started at creation time and will be reused.\ The second implementation is a dynamic worker pool, with a number of worker started at creation time (these workers will be always active and reused) and other workers created when the load will increase (with an upper limit, these workers will be reused when active), the newly created workers will be stopped after a configurable period of inactivity.\ You have to implement your worker by extending the _ThreadWorker_ class. Usage Deno **See Deno examples for more details**: • Javascript • Typescript Bun npmjs JSR **See Bun examples for more details**: • Typescript Browser Example code You can implement a poolifier web worker in a simple way by extending the class _ThreadWorker_: Instantiate your pool based on your needs : Remember that workers can only send and receive structured-cloneable data. Deno and Bun versions • Deno versions >= 1.40.x are supported. • Bun versions >= 1.x are supported. API General guidelines Worker choice strategies Contribute Choose your task here, propose an idea, a fix, an improvement. See CONTRIBUTING guidelines. Team **Creator/Owner:** • **Alessandro Pio Ardizio** **Maintainers:** • **Jérôme Benoit** **Contributors:** • **Shinigami92** License MIT