Threadpool11
A fast, lock-free, cross-platform C++11 thread pool library that is aiming to be lightweight and simple.
Install / Use
/learn @tghosgor/Threadpool11README
threadpool11
A fast, almost lock-free, cross-platform, full CPU utilizing thread pool implementation using C++11 features.
You can find the dead simple API documentation on header comments.
This project was initially developed in just a few hours of free time as I could not find a simple lightweight thread pooling library for my needs.
threadpool11 performance compared to OpenMP
Here is a result of OpenMP demo found in the tree.
Your machine's hardware concurrency is 8
threadpool11 execution took 22704 milliseconds.
threadpool11 (no future) execution took 21198 milliseconds.
openmp execution took 21663 milliseconds.
openmp execution (dynamic schedule) took 21335 milliseconds.
gcc -v gcc version 8.2.1 20181127 (GCC)
Testing code can be found in project tree.
I will be glad to hear about the suggestions/ideas you have about the project, via the issue reporting section.
All non '-dev' branches are safe to use but prefer the latest version.
Building & Installing
As a Static Library
% mkdir -p build
% cd build
% cmake ..
% make
% make test
% make install
As a Shared Library
% mkdir -p build
% cd build
% cmake -DBUILD_SHARED_LIBS:BOOL=ON ..
% make
% make test
% make install
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
