MCPcopy Create free account
hub / github.com/AimRT/AimRT / SetExecutorThreadSchedOption

Method SetExecutorThreadSchedOption

src/plugins/ros2_plugin/ros2_plugin.cc:166–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void Ros2Plugin::SetExecutorThreadSchedOption() {
167 try {
168 aimrt::runtime::core::util::SetNameForCurrentThread(options_.executor_name);
169 aimrt::runtime::core::util::BindCpuForCurrentThread(options_.executor_bind_cpus);
170 aimrt::runtime::core::util::SetCpuSchedForCurrentThread(options_.executor_sched_policy);
171 } catch (const aimrt::common::util::AimRTException& e) {
172 AIMRT_WARN("Set thread policy for ros2 executor '{}' get exception, {}",
173 Name(), e.what());
174 }
175}
176
177void Ros2Plugin::SetPluginLogger() {
178 SetLogger(aimrt::logger::LoggerRef(

Callers

nothing calls this directly

Calls 4

SetNameForCurrentThreadFunction · 0.85
BindCpuForCurrentThreadFunction · 0.85
whatMethod · 0.80

Tested by

no test coverage detected