JayBeams
0.1
Another project to have fun coding.
|
Hold the configuration to initialize threads. More...
#include <thread_config.hpp>
Public Member Functions | |
thread_config () | |
Constructor. More... | |
config_object_constructors (thread_config) | |
int | native_scheduling_policy () const |
int | native_priority () const |
![]() | |
config_object () | |
Default constructor. More... | |
config_object (config_object const &rhs) | |
Copy constructor. More... | |
config_object (config_object &&rhs) | |
Move constructor. More... | |
virtual | ~config_object () |
Destructor. More... | |
config_object & | operator= (config_object rhs) |
Copy & swap assignment. More... | |
void | swap (config_object &rhs) |
Derived classes should implement member by member swap. More... | |
void | load_overrides (int &argc, char *argv[], std::string const &filename, char const *environment_variable_name) |
Read the configuration file and load the overrides defined therein. More... | |
void | load_overrides (int &argc, char *argv[], std::string const &filename) |
Read the configuration file and load the overrides defined therein. More... | |
void | load_overrides (int &argc, char *argv[], std::istream &is) |
Read the configuration file and load the overrides defined therein. More... | |
void | process_cmdline (int &argc, char *argv[]) |
Process the command line. More... | |
virtual void | validate () const |
Validate the settings. More... | |
std::ostream & | to_stream (std::ostream &os) const |
Print out the settings. More... | |
Public Attributes | |
jb::config_attribute< thread_config, std::string > | name |
jb::config_attribute< thread_config, std::string > | scheduler |
jb::config_attribute< thread_config, std::string > | priority |
jb::config_attribute< thread_config, jb::cpu_set > | affinity |
jb::config_attribute< thread_config, bool > | ignore_setup_errors |
Additional Inherited Members | |
![]() | |
static attribute_descriptor | desc (std::string const &name) |
Convenience function to create attribute descriptors with less typing. More... | |
static attribute_descriptor | desc (std::string const &name, std::string const &class_name) |
Convenience function to create attribute descriptors with less typing. More... | |
Hold the configuration to initialize threads.
After a thread is started we want to be able to consistently configure its scheduling policy, priority, processor affinity, etc. This class is used to contain such configurations.
Definition at line 16 of file thread_config.hpp.
thread_config::thread_config | ( | ) |
Constructor.
Definition at line 29 of file thread_config.cpp.
jb::thread_config::config_object_constructors | ( | thread_config | ) |
int thread_config::native_priority | ( | ) | const |
Definition at line 75 of file thread_config.cpp.
References native_scheduling_policy(), priority, and jb::strtonum().
Referenced by BOOST_AUTO_TEST_CASE(), and jb::detail::reconfigure_this_thread().
int thread_config::native_scheduling_policy | ( | ) | const |
Definition at line 54 of file thread_config.cpp.
References scheduler.
Referenced by BOOST_AUTO_TEST_CASE(), native_priority(), and jb::detail::reconfigure_this_thread().
jb::config_attribute<thread_config, jb::cpu_set> jb::thread_config::affinity |
Definition at line 25 of file thread_config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and jb::detail::reconfigure_this_thread().
jb::config_attribute<thread_config, bool> jb::thread_config::ignore_setup_errors |
Definition at line 26 of file thread_config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and jb::detail::reconfigure_this_thread().
jb::config_attribute<thread_config, std::string> jb::thread_config::name |
Definition at line 22 of file thread_config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and jb::detail::reconfigure_this_thread().
jb::config_attribute<thread_config, std::string> jb::thread_config::priority |
Definition at line 24 of file thread_config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and native_priority().
jb::config_attribute<thread_config, std::string> jb::thread_config::scheduler |
Definition at line 23 of file thread_config.hpp.
Referenced by BOOST_AUTO_TEST_CASE(), and native_scheduling_policy().