7#include <boost/signals2.hpp>
9#include <condition_variable>
11#include <boost/signals2.hpp>
20 std::unique_lock<std::mutex> lock(
mutex_);
21 ROS_DEBUG(
"[CallbackCounterSemaphore] acquire callback %s %ld",
name_.c_str(), (
long)
this);
25 ROS_DEBUG(
"[CallbackCounterSemaphore] callback rejected %s %ld",
name_.c_str(), (
long)
this);
32 ROS_DEBUG(
"[CallbackCounterSemaphore] callback accepted %s %ld",
name_.c_str(), (
long)
this);
37 std::unique_lock<std::mutex> lock(
mutex_);
41 ROS_DEBUG(
"[CallbackCounterSemaphore] callback finished %s %ld",
name_.c_str(), (
long)
this);
45 std::unique_lock<std::mutex> lock(
mutex_);
58 ROS_DEBUG(
"[CallbackCounterSemaphore] callbacks finalized %s %ld",
name_.c_str(), (
long)
this);
63 std::unique_lock<std::mutex> lock(
mutex_);
67 ROS_DEBUG(
"[CallbackCounterSemaphore] ignoring adding callback, already finalized %s %ld",
name_.c_str(), (
long)
this);
void addConnection(boost::signals2::connection conn)
std::vector< boost::signals2::connection > connections_
std::condition_variable cv_
CallbackCounterSemaphore(std::string name, int count=0)