# panjf2000/ants

🐜🐜🐜 ants is the most powerful and reliable pooling solution for Go.

Repository: https://github.com/panjf2000/ants
Canonical: https://ross.abutalabs.com/products/ants
Homepage: https://ants.andypan.me/
Language: Go
License: MIT
License Family: permissive
Topics: goroutine-pool, goroutine, pool, go, worker-pool, ants
Last push: 2026-07-04T08:40:49+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 43, longevity 100
- inputs: {"age_days": 3029, "days_push": 60, "days_rel": 166, "gap_med": 431, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 14492, forks 1436 (observed 2026-08-28T04:11:07.114194+00:00)

## What it is
ants is a high-performance goroutine pool library for Go that manages and recycles a massive number of goroutines with a fixed-capacity pool. It helps developers limit concurrency, handle panics gracefully, and reduce memory overhead in concurrent programs.

## Use cases
- limit the number of goroutines in a Go program
- reuse goroutines to reduce memory allocation overhead
- submit tasks to a fixed-capacity worker pool
- gracefully recover from panics in concurrent task execution
- dynamically tune pool capacity at runtime
- process large batches of jobs with bounded concurrency

## When to choose
- your Go application spawns huge numbers of short-lived goroutines and suffers memory pressure
- you need bounded concurrency with a simple, battle-tested API
- you want panic-safe task execution without crashing the process

## When to avoid
- your workload has few long-running goroutines where pooling adds little value
- you need full-featured job queues with persistence or distributed scheduling
- you are not programming in Go

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, developer-tools
- domain: developer-tools, performance, backend
- platform: go, cross-platform
- tags: goroutine-pool, worker-pool, task-scheduling, high-concurrency

## Member repositories
- panjf2000/ants (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:07.114194+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-29T17:12:31.725398+00:00, confidence not recorded.
  - readme: https://github.com/panjf2000/ants (fetched 2026-08-28T04:11:07.114194+00:00, sha f5829f047919)
  - homepage: https://ants.andypan.me/ (fetched 2026-08-29T08:05:54.004686+00:00, sha 45f900babef8)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T08:05:54.009268+00:00, sha 757852027879)
  - site_page: https://go.dev/project (fetched 2026-08-29T08:05:54.012148+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
