32 total_cores = std::thread::hardware_concurrency();
40 if (total_cores == 0) {
63 "Number of ThreadGroup in the engine.\n"
64 " Default value is hardware NUMA node count (::numa_num_configured_nodes()).");
66 "Number of Thread in each ThreadGroup. Default value is hardware NUMA core count;\n"
67 " ::numa_num_configured_cpus() / ::numa_num_configured_nodes()");
69 "Whether to overwrite policy/priority of worker threads.");
71 "Thread policy for worker threads. ignored if overwrite_thread_schedule_==false\n"
72 "The values are compatible with pthread's values.");
74 "Thread priority for worker threads. ignored if overwrite_thread_schedule_==false\n"
75 "The values are compatible with pthread's values.");
#define EXTERNALIZE_LOAD_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
ThreadOptions()
Constructs option values with default values.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Brings error stacktrace information as return value of functions.
static ErrorStack insert_comment(tinyxml2::XMLElement *element, const std::string &comment)
#define EXTERNALIZE_SAVE_ENUM_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
ThreadLocalOrdinal thread_count_per_group_
Number of Thread in each ThreadGroup.
bool overwrite_thread_schedule_
Whether to overwrite policy/priority of worker threads.
int numa_num_configured_nodes()
ErrorStack load(tinyxml2::XMLElement *element) override
Reads the content of this object from the given XML element.
int numa_num_configured_cpus()
#define EXTERNALIZE_LOAD_ENUM_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
ThreadPriority thread_priority_
Thread priority for worker threads.
uint16_t group_count_
Number of ThreadGroup in the engine.
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
const ErrorStack kRetOk
Normal return value for no-error case.
ThreadPolicy thread_policy_
Thread policy for worker threads.
#define EXTERNALIZE_SAVE_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
ErrorStack save(tinyxml2::XMLElement *element) const override
Writes the content of this object to the given XML element.