Boost ASIO thread pool

Maharajan Shunmuga Sundaram
4 min readNov 22, 2020

Abstract

I was looking for implementation of a thread pool in C++ with following features.

  • The thread pool should work with configured number of threads
  • It should schedule every job based on key. All the jobs scheduled with same key should be executed sequentially and with different keys should be executed in parallel.

The real reason for this thread pool is that it is very easy to create such a thread pool instance one per process and use the thread pool to sequence calls based on keys without using low…

--

--