# developit/greenlet

🦎 Move an async function into its own thread.

Repository: https://github.com/developit/greenlet
Canonical: https://ross.abutalabs.com/products/greenlet
Homepage: https://npm.im/greenlet
Language: JavaScript
License Family: other
Topics: worker, webworker, thread, web-worker, workerize
Last push: 2021-03-01T20:22:52+00:00

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

## Adoption (not part of the score)
Stars 4688, forks 97 (observed 2026-08-28T04:08:56.997235+00:00)

## What it is
Greenlet is a tiny JavaScript library that takes an async function and returns a version of it that runs in its own Web Worker thread. It is a simplified single-function variant of workerize, with performance comparable to direct Worker usage.

## Use cases
- run a cpu-heavy async function off the main thread
- move an async function into a web worker without writing worker boilerplate
- fetch network resources in a background thread and return only needed data
- offload expensive computation from the browser ui thread
- use transferable objects efficiently between threads

## When to choose
- you need a single self-contained function to run off the main thread
- you want minimal bundle size and zero worker scaffolding
- your function has small inputs and outputs and doesn't need shared scope

## When to avoid
- you need multiple functions or shared state in a worker (use workerize)
- your function depends on its surrounding closure scope
- you need active maintenance or guaranteed long-term support
- you need Node.js support without polyfilling Web Workers

## Facets
- artifact type: library
- maturity: maintenance
- function: concurrency, developer-tools
- domain: web-development, developer-tools, performance
- platform: browser, cross-platform
- tags: web-workers, async, threads, off-main-thread, micro-library, nodejs

## Member repositories
- developit/greenlet (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:56.997235+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-29T18:19:16.896876+00:00, confidence not recorded.
  - readme: https://github.com/developit/greenlet (fetched 2026-08-28T04:08:56.997235+00:00, sha 5467a9073c1d)
  - registry_npm: https://registry.npmjs.org/greenlet (fetched 2026-08-29T09:03:28.559907+00:00, sha 6448aac7cb98)
- Data as of 2026-08-30T08:39:29.467469+00:00.
