pthread_ext.h is an extension for POSIX pthread: thread pool, channel, task group.
- not a toy
- single-header
- flexible API
- highly optimized
- manual memory control
- thread pool + attributes
- task group + attributes
- pipe-based channel
- POSIX-compatible environment
- C89 compiler
| Pool | Runtime (ms) |
|---|---|
| pthread_pool_t (noalloc) | ~65 |
| pthread_pool_t (batch) | ~82 |
| pthread_pool_t (default) | ~100 |
| boost::asio::thread_pool | ~145 |
| BS::thread_pool | ~144 |
| TBB | ~22 |
See BENCHMARK.md for full details and its code
- examples are in main.c
- on Windows native
pthread_killis broken — so here it's replaced with thread context manipulation