# vit-vit/CTPL

Modern and efficient C++ Thread Pool Library

Repository: https://github.com/vit-vit/CTPL
Canonical: https://ross.abutalabs.com/products/ctpl
Language: C++
License: Apache-2.0
License Family: permissive
Last push: 2023-01-26T06:30:38+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4385, "days_push": 1315, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2034, forks 362 (observed 2026-08-28T04:06:07.895327+00:00)

## What it is
CTPL is a modern, efficient, header-only C++ thread pool library implementing the thread pool pattern for parallel job execution. It supports pushing any callable (lambdas, functors, functions) with variadic parameters, dynamic pool resizing, and returning results via standard C++ futures.

## Use cases
- run tasks in parallel with a fixed set of worker threads
- limit the number of concurrently executing jobs
- avoid thread creation/destruction overhead in a C++ app
- process background event handlers to keep a UI responsive
- get results or exceptions from submitted tasks via std::future
- resize the worker pool dynamically at runtime

## When to choose
- you need a simple, dependency-free, header-only thread pool in standard C++
- you want to push arbitrary callables with variadic arguments and futures-based results
- you need to bound parallelism and query idle threads

## When to avoid
- you need advanced scheduling, priorities, or work stealing beyond a basic pool
- your project requires a more feature-rich or actively evolving concurrency framework
- you cannot use C++11 or, for the Boost variant, the Boost Lockfree dependency

## Facets
- artifact type: library
- maturity: stable
- function: concurrency
- domain: developer-tools
- platform: cpp, cross-platform
- tags: thread-pool, header-only, parallel-execution, futures, algorithms

## Member repositories
- vit-vit/CTPL (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:07.895327+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-30T02:59:25.542629+00:00, confidence not recorded.
  - readme: https://github.com/vit-vit/CTPL (fetched 2026-08-28T04:06:07.895327+00:00, sha 27c603b28ca2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
