20#include <boost/signals2.hpp>
21#include <condition_variable>
24#include <rclcpp/rclcpp.hpp>
31: count_(
count), name_(name)
39 rclcpp::get_logger(
name_),
"[CallbackCounterSemaphore] acquire callback %s %ld",
name_.c_str(),
45 rclcpp::get_logger(
name_),
"[CallbackCounterSemaphore] callback rejected %s %ld",
46 name_.c_str(), (
long)
this);
54 rclcpp::get_logger(
name_),
"[CallbackCounterSemaphore] callback accepted %s %ld",
name_.c_str(),
66 rclcpp::get_logger(
name_),
"[CallbackCounterSemaphore] callback finished %s %ld",
name_.c_str(),
87 rclcpp::get_logger(
name_),
"[CallbackCounterSemaphore] callbacks finalized %s %ld",
88 name_.c_str(), (
long)
this);
98 rclcpp::get_logger(
name_),
99 "[CallbackCounterSemaphore] ignoring adding callback, already finalized %s %ld",
100 name_.c_str(), (
long)
this);
std::condition_variable cv_
void addConnection(boost::signals2::connection conn)
CallbackCounterSemaphore(std::string name, int count=0)
std::vector< boost::signals2::connection > connections_