brainstate

progschj/ThreadPool · source

Snapshot 0 · 2026-11-04T12:47:22Z · C++ · Zlib

Content fingerprintcf37cab50970370171550535352ae8b942b1815c887d9ddef9d63eb56725419b

GitHub description at capture

A simple C++11 Thread Pool implementation

README at capture

ThreadPool
==========

A simple C++11 Thread Pool implementation.

Basic usage:
```c++
// 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;

```