forked from inkooboo/thread-pool-cpp
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.md
38 lines (32 loc) · 1.4 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
thread-pool-cpp
=================
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
* It is highly scalable and fast.
* It is header only.
* No external dependencies, only standard library needed.
* It implements both work-stealing and work-distribution balancing startegies.
* It implements cooperative scheduling strategy.
Example run:
Post job to thread pool is much faster than for boost::asio based thread pool.
Benchmark job reposting
***thread pool cpp***
reposted 1000001 in 61.6754 ms
reposted 1000001 in 62.0187 ms
reposted 1000001 in 62.8785 ms
reposted 1000001 in 70.2714 ms
***asio thread pool***
reposted 1000001 in 1381.58 ms
reposted 1000001 in 1390.35 ms
reposted 1000001 in 1391.84 ms
reposted 1000001 in 1393.19 ms
See benchmark/benchmark.cpp for benchmark code.
All code except [MPMCBoundedQueue](https://github.com/inkooboo/thread-pool-cpp/blob/master/include/thread_pool/mpmc_bounded_queue.hpp)
is under MIT license.
Additions
=========
1. Spin lock replaced to conditional variable. Spurious wakeup protection added.
2. Affinity (by round-robin) added for Linux/Solaris/FreeBSD. Affinity control flag added.
3. Round Robin Queue Servicing from https://github.com/inkooboo/thread-pool-cpp/pull/24 are implemented.
4. Oracle Developer Studio support
5. Sleep counter added.
6. Queue overflow round-robin improved protection.