We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37f8c73 commit 208eacfCopy full SHA for 208eacf
include/behaviortree_cpp/loggers/abstract_logger.h
@@ -61,6 +61,7 @@ class StatusChangeLogger
61
std::vector<TreeNode::StatusChangeSubscriber> subscribers_;
62
TimestampType type_;
63
BT::TimePoint first_timestamp_ = {};
64
+ std::mutex callback_mutex_;
65
};
66
67
//--------------------------------------------
@@ -72,6 +73,7 @@ inline StatusChangeLogger::StatusChangeLogger(TreeNode* root_node)
72
73
74
auto subscribeCallback = [this](TimePoint timestamp, const TreeNode& node,
75
NodeStatus prev, NodeStatus status) {
76
+ std::unique_lock lk(callback_mutex_);
77
if(enabled_ && (status != NodeStatus::IDLE || show_transition_to_idle_))
78
{
79
if(type_ == TimestampType::absolute)
0 commit comments