You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Light, fast, work-stealing thread-pool for C++20. Built on the [`riften::Thiefpool`](https://github.com/ConorWilliams/ConcurrentDeque).
3
+
A blazing-fast, lightweight, work-stealing thread-pool for C++20. Built on the lock-free concurrent [`riften::Deque`](https://github.com/ConorWilliams/ConcurrentDeque).
4
4
5
5
## Usage
6
6
7
7
```C++
8
-
9
8
#include"riften/thiefpool.hpp"
10
9
11
10
// Create thread pool with 4 worker threads.
12
11
riften::Thiefpool pool(4);
13
12
14
-
// Enqueue and store future.
13
+
// Enqueue and return future.
15
14
auto result = pool.enqueue([](int x) { return x; }, 42);
16
15
17
16
// Get result from future.
18
17
std::cout << result.get() << std::endl;
18
+
```
19
+
20
+
Additionally, `riften::Thiefpool` supplies a detaching version of enqueue:
0 commit comments