Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Lost Wake Bug in ROSOutAppender (#2033)
This fixes a bug in ROSOutAppender that consists of waiting on the condition_variable `queue_condition_` without checking if the `log_queue_` is empty. In this situation if the `log_queue_` had some messages that were inserted while `ROSOutAppender::logThread` was publishing other messages, the new messages in the queue won't be published, until another message eventually is added. Note that the `notify_all` sent in the destructor would not cause the unpublished messages to get published, as when the `queue_condition_` is awaken by this notification, `shutting_down_` would be true and would cause `ROSOutAppender::logThread` to return immediately. Co-authored-by: Adel Fakih <adel.fakih@avidbots.com>
- Loading branch information