8 #include <fmt/format.h> 9 #include <soralog/util.hpp> 15 : context_(
std::move(context)), config_(configuration) {
23 auto thread = std::make_shared<std::thread>([context =
context_,
24 rpc_thread_number = i + 1] {
25 soralog::util::setThreadName(fmt::format(
"rpc.{}", rpc_thread_number));
29 threads_.emplace_back(std::move(thread));
31 SL_DEBUG(
logger_,
"Thread pool started");
36 SL_DEBUG(
logger_,
"Thread pool stopped");
std::vector< std::shared_ptr< std::thread > > threads_
RpcThreadPool(std::shared_ptr< Context > context, const Configuration &configuration)
std::shared_ptr< Context > context_
const Configuration config_