Function realtime_tools::set_current_thread_affinity(const std::vector<int>&)
Defined in File realtime_helpers.hpp
Function Documentation
-
std::pair<bool, std::string> realtime_tools::set_current_thread_affinity(const std::vector<int> &cores)
Configure the current thread affinity - Tell the scheduler to prefer a certain set of cores for the current thread.
Note
The threads created by the calling thread will inherit the affinity.
- Parameters:
core – [in] the cpu numbers of the core. If an empty vector is passed, the affinity is reset to the default.
- Returns:
a pair of a boolean indicating whether the operation succeeded or not and a message describing the result of the operation