# W4G1/multithreading

The missing standard library for multithreading in JavaScript (Works in the browser, Node.js, Deno, Bun)

Repository: https://github.com/W4G1/multithreading
Canonical: https://ross.abutalabs.com/products/multithreading
Language: TypeScript
License: MIT
License Family: permissive
Topics: multithreading, threads, webworkers, worker-threads, concurrency, javascript, multi-threading, nodejs, parallel-processing, typescript, web-worker, web-workers, shared-worker, worker-pool, bun, deno, shared-array-buffer, sharedarraybuffer, thread-pool, atomics
Last push: 2026-03-26T15:49:22+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 74, release rhythm 35, longevity 70
- inputs: {"age_days": 992, "days_push": 160, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1609, forks 26 (observed 2026-08-28T04:05:10.778975+00:00)

## What it is
A TypeScript library providing Rust-inspired concurrency primitives for JavaScript, including a managed worker pool, Mutexes, Semaphores, and shared memory via SharedArrayBuffer. It abstracts Web Workers and serialization so multithreaded code feels like standard async JavaScript across browser, Node.js, Deno, and Bun.

## Use cases
- run cpu-bound tasks in parallel in javascript
- use web workers without boilerplate
- share state between threads safely in node
- create a thread pool in the browser
- pass data to workers with move semantics
- use mutexes and semaphores in javascript

## When to choose
- you need true parallelism for CPU-heavy work in JS across browser and server runtimes
- you want safe shared-memory concurrency primitives instead of raw Worker messaging
- you want a managed worker pool sized to hardware concurrency

## When to avoid
- your workload is I/O-bound and async/await is sufficient
- you need mature, battle-tested production threading with a large ecosystem
- you target environments without SharedArrayBuffer support

## Facets
- artifact type: library
- maturity: active
- function: concurrency, developer-tools
- domain: developer-tools, web-development, cross-platform
- platform: browser, bun, cross-platform
- tags: multithreading, web-workers, worker-pool, shared-array-buffer, mutex, parallelism, typescript, rust-inspired, nodejs, deno

## Member repositories
- W4G1/multithreading (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:10.778975+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:51:15.977728+00:00, confidence not recorded.
  - readme: https://github.com/W4G1/multithreading (fetched 2026-08-28T04:05:10.778975+00:00, sha 09e5a0689bc0)
  - registry_npm: https://registry.npmjs.org/multithreading (fetched 2026-08-29T11:23:38.101661+00:00, sha 961b27df528b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
