DeepSpeech/native_client/ctcdecode/third_party/ThreadPool
2018-11-26 08:29:02 +03:00
..
COPYING catalan! 2018-11-26 08:29:02 +03:00
example.cpp catalan! 2018-11-26 08:29:02 +03:00
README.md catalan! 2018-11-26 08:29:02 +03:00
ThreadPool.h catalan! 2018-11-26 08:29:02 +03:00

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;