BS::thread_pool: a fast, lightweight, and easy-to-use C++17 thread pool library. This header file contains the entire library, including the main BS::thread_pool class and the helper classes BS::multi_future, BS::blocks, BS:synced_stream, and BS::timer.
More...
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <exception>
#include <functional>
#include <future>
#include <iostream>
#include <memory>
#include <mutex>
#include <queue>
#include <thread>
#include <type_traits>
#include <utility>
#include <vector>
|
class | multi_future< T > |
| A helper class to facilitate waiting for and/or getting the results of multiple futures at once. More...
|
|
class | blocks< T1, T2, T > |
| A helper class to divide a range into blocks. Used by parallelize_loop() and push_loop(). More...
|
|
class | thread_pool |
| A fast, lightweight, and easy-to-use C++17 thread pool class. More...
|
|
class | synced_stream |
| A helper class to synchronize printing to an output stream by different threads. More...
|
|
class | timer |
| A helper class to measure execution time for benchmarking purposes. More...
|
|
|
#define | BS_THREAD_POOL_VERSION "v3.4.0 (2023-05-12)" |
|
|
using | concurrency_t = std::invoke_result_t< decltype(std::thread::hardware_concurrency)> |
| A convenient shorthand for the type of std::thread::hardware_concurrency(). Should evaluate to unsigned int.
|
|
BS::thread_pool: a fast, lightweight, and easy-to-use C++17 thread pool library. This header file contains the entire library, including the main BS::thread_pool class and the helper classes BS::multi_future, BS::blocks, BS:synced_stream, and BS::timer.
- Author
- Barak Shoshany (barak.nosp@m.sh@g.nosp@m.mail..nosp@m.com) (http://baraksh.com)
- Version
- 3.4.0
- Date
- 2023-05-12
- Copyright
- Copyright (c) 2023 Barak Shoshany. Licensed under the MIT license. If you found this project useful, please consider starring it on GitHub! If you use this library in software of any kind, please provide a link to the GitHub repository https://github.com/bshoshany/thread-pool in the source code and documentation. If you use this library in published research, please cite it as follows: Barak Shoshany, "A C++17 Thread Pool for High-Performance Scientific Computing", doi:10.5281/zenodo.4742687, arXiv:2105.00613 (May 2021)