18 std::lock_guard<std::mutex> lock(
mutex_);
23 it =
handlers_.emplace(std::make_pair(signal_, std::list<Handler>())).first;
27 for (
auto& jt : it->second)
29 if (jt.target_type().name() == handler.target_type().name())
35 it->second.push_back(handler);
40 std::lock_guard<std::mutex> lock(
mutex_);
48 for (
auto jt = it->second.begin(); jt != it->second.end(); ++jt)
50 if (jt->target_type().name() == handler.target_type().name())
54 if (it->second.empty())
57 signal(signal_, SIG_DFL);
67 std::lock_guard<std::mutex> lock(
mutex_);
75 for (
auto& jt : it->second)
static void unbind(int signal, void(T::*fp)(int), T *object)
static std::map< int, std::list< Handler > > handlers_
static void bind(int signal, void(T::*fp)(int), T *object)
static void signaled(int signal)
std::function< void(int)> Handler