35 #ifndef ROSCPP_CALLBACK_QUEUE_H 36 #define ROSCPP_CALLBACK_QUEUE_H 43 #include <boost/shared_ptr.hpp> 44 #include <boost/thread/mutex.hpp> 45 #include <boost/thread/shared_mutex.hpp> 46 #include <boost/thread/tss.hpp> 64 virtual void removeByID(uint64_t removal_id);
149 IDInfoPtr getIDInfo(uint64_t
id);
155 , marked_for_removal(false)
174 : calling_in_this_thread(0xffffffffffffffffULL)
175 , cb_it(callbacks.end())
181 boost::thread_specific_ptr<TLS>
tls_;
boost::thread_specific_ptr< TLS > tls_
D_CallbackInfo::iterator cb_it
bool empty()
returns whether or not the queue is empty
This is the default implementation of the ros::CallbackQueueInterface.
boost::shared_mutex calling_rw_mutex
ros::internal::condition_variable_monotonic condition_
CallOneResult callOne()
Pop a single callback off the front of the queue and invoke it. If the callback was not ready to be c...
Abstract interface for a queue used to handle all callbacks within roscpp.
std::map< uint64_t, IDInfoPtr > M_IDInfo
D_CallbackInfo callbacks_
boost::shared_ptr< IDInfo > IDInfoPtr
boost::shared_ptr< CallbackQueue > CallbackQueuePtr
void callAvailable()
Invoke all callbacks currently in the queue. If a callback was not ready to be called, pushes it back onto the queue.
boost::condition_variable condition_variable_monotonic
boost::mutex id_info_mutex_
std::list< CallbackInfo > L_CallbackInfo
uint64_t calling_in_this_thread
CallbackInterfacePtr callback
std::deque< CallbackInfo > D_CallbackInfo