irobot-ros / events-executor

ROS 2 C++ executor bringing low CPU usage, low latency and deterministic ordering
BSD 3-Clause "New" or "Revised" License
43 stars 13 forks source link

do not try to execute head timer in spin_once_impl #17

Open alsora opened 1 year ago

alsora commented 1 year ago

do not try to execute head timer in spin_once_impl if we are not waiting for it

This fixes an inefficiency that would occur when:

in this situation, bool has_event = events_queue_->dequeue(event, timeout); would timeout returning false, but we don't want to execute the head timeout.