37 #include <boost/scope_exit.hpp>
55 boost::mutex::scoped_lock lock(
mutex_);
63 boost::mutex::scoped_lock lock(
mutex_);
71 boost::mutex::scoped_lock lock(
mutex_);
78 boost::mutex::scoped_lock lock(
mutex_);
85 boost::mutex::scoped_lock lock(
mutex_);
107 M_IDInfo::iterator it =
id_info_.find(removal_id);
110 IDInfoPtr id_info(boost::make_shared<IDInfo>());
111 id_info->id = removal_id;
112 id_info_.insert(std::make_pair(removal_id, id_info));
117 boost::mutex::scoped_lock lock(
mutex_);
133 M_IDInfo::iterator it =
id_info_.find(
id);
150 M_IDInfo::iterator it =
id_info_.find(removal_id);
153 id_info = it->second;
163 if (
tls_->calling_in_this_thread == id_info->id)
165 id_info->calling_rw_mutex.unlock_shared();
169 boost::unique_lock<boost::shared_mutex> rw_lock(id_info->calling_rw_mutex, boost::defer_lock);
170 if (rw_lock.try_lock())
172 boost::mutex::scoped_lock lock(
mutex_);
173 D_CallbackInfo::iterator it =
callbacks_.begin();
191 boost::mutex::scoped_lock lock(
mutex_);
203 if (
tls_->calling_in_this_thread == id_info->id)
205 id_info->calling_rw_mutex.lock_shared();
212 D_CallbackInfo::iterator it =
tls_->callbacks.begin();
213 D_CallbackInfo::iterator end =
tls_->callbacks.end();
214 for (; it != end; ++it)
238 boost::mutex::scoped_lock lock(
mutex_);
263 D_CallbackInfo::iterator it =
callbacks_.begin();
302 boost::mutex::scoped_lock lock(
mutex_);
314 boost::mutex::scoped_lock lock(
mutex_);
358 boost::mutex::scoped_lock lock(
mutex_);
386 boost::shared_lock<boost::shared_mutex> rw_lock(id_info->calling_rw_mutex);
397 BOOST_SCOPE_EXIT(&tls, &last_calling)
417 boost::mutex::scoped_lock lock(
mutex_);