#pragma once #include #include #include #include "lib/config/protos/threads.pb.h" namespace bts { namespace config {class ThreadGroupCfg;} namespace threading { std::thread make_thread_from_function(std::string const&name, std::function const&c, config::ThreadGroupCfg const&cfg); std::thread make_thread_from_function(std::string const&name, std::function const&c); template std::thread make_thread(std::string const &name, C callable) { return make_thread_from_function (name, std::function (callable)); } template std::thread make_thread(std::string const &name, C callable,config::ThreadGroupCfg const&cfg) { return make_thread_from_function (name, std::function (callable),cfg); } void configure_current_thread(std::string const&name); void configure_current_thread(std::string const&name, config::ThreadGroupCfg const&); config::ThreadGroupCfg get_thread_cfg(std::string const &); std::vector get_affinity(std::string const&name); }}