Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

ThreadPool

> 编程语言
Open source

A simple C++11 Thread Pool implementation

8.8K stars0 likes2 views
WebsiteGitHub

About

A simple C++11 Thread Pool implementation

ThreadPool

A simple C++11 Thread Pool implementation.

Basic usage:

cpp
// create thread pool with 4 worker threads
ThreadPool pool(4);

// enqueue and store future
auto result = pool.enqueue([](int answer) { return answer; }, 42);

// get result from future
std::cout << result.get() << std::endl;

Issues· 61 open

View all issuesOpen on GitHub
  • #128

    Proposal for OpenHarmony Adaptation of [ ThreadPool ]

    Updated Feb 19, 2026
  • #126

    Thread pool function extension

    Updated Feb 7, 2025
  • #124

    bug

    Updated Jan 14, 2025
  • #115

    possible deadlock during ~ThreadPool

    Updated Dec 10, 2024
  • #66

    How can We Use A override member Function in threadpool enqueue ?

    Updated Oct 25, 2024
  • #110

    Unexpected stuck thread

    Updated Oct 18, 2024
  • #112

    a

    Updated Oct 18, 2024
  • #90

    Similar C implementation

    Updated Oct 12, 2024
  • #123

    How to add support for thread binding cpu_cores ?

    Updated Oct 12, 2024
  • #50

    Why not use std::atomic<bool> instead of bool?

    Updated Sep 13, 2024

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedDec 5, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言