64 : options_(options), running_(false), done_(false), thread_(), rate_(options)
69 : options_(std::move(other.options_))
70 , running_(other.running_.load())
71 , done_(other.done_.load())
72 , thread_(std::move(other.thread_))
73 , rate_(std::move(other.rate_))
103 sched.sched_priority = 0;
106 sched.sched_priority = priority;
113 if (sched.sched_priority != 0)
115 if (pthread_setschedparam(
thread_.native_handle(), SCHED_FIFO, &sched) != 0)
117 ROS_WARN(
"Failed to set thread priority for worker [%s]: %s",
options_.
name_.c_str(), strerror(errno));
128 if (wait &&
thread_.joinable())
138 ROS_ERROR(
"Cannot change timestep of Worker [%s] to %f, invalid value.",
options_.
name_.c_str(), timeStep);
142 if (!std::isinf(timeStep))
161 clock_gettime(CLOCK_MONOTONIC, &now);