You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Guo XIn
291e661666
|
5 months ago | |
---|---|---|
.. | ||
COPYING | 5 months ago | |
README.md | 5 months ago | |
ThreadPool.h | 5 months ago | |
example.cpp | 5 months ago |
README.md
ThreadPool
A simple C++11 Thread Pool implementation.
Basic usage:
// 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;