3#include "BS_thread_pool.hpp"
4#include "debugtrace.hpp"
20using Lck = std::scoped_lock<std::mutex>;
21using rte = std::runtime_error;
29 _pool = std::make_shared<BS::thread_pool>();
31 throw rte(
"Fatal: could not allocate thread pool!");
GlobalThreadPool()
Instantiate handle to the thread pool.
std::scoped_lock< std::mutex > Lck
std::weak_ptr< BS::thread_pool > _global_weak_pool
Store a global weak_ptr, that is used to create new shared pointers if any other shared pointers are ...
std::mutex _mtx
Global mutex, used to restrict the pool creation to a single thread at once.
std::scoped_lock< std::mutex > lck