tree: b9ce59648642adf039ab001eaf641a3624cf9065 [path history] [tgz]
  1. COPYING
  2. example.cpp
  3. README.md
  4. ThreadPool.h
example/client-cpp-example/src/ThreadPool/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;