added tp getter to async api

This commit is contained in:
gabime
2018-05-27 03:14:55 +03:00
parent c568640595
commit ef5c4f027c
4 changed files with 13 additions and 8 deletions

View File

@@ -59,4 +59,10 @@ inline void init_thread_pool(size_t q_size, size_t thread_count)
auto tp = std::make_shared<thread_pool>(q_size, thread_count);
registry::instance().set_thread_pool(std::move(tp));
}
// get the global thread pool.
inline std::shared_ptr<spdlog::details::thread_pool> thread_pool()
{
return details::registry::instance().get_thread_pool();
}
} // namespace spdlog