• Stars
    star
    7,787
  • Rank 4,875 (Top 0.1 %)
  • Language
    C++
  • License
    zlib License
  • Created about 12 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple C++11 Thread Pool implementation

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;