30 #ifndef NODELET_CALLBACK_QUEUE_MANAGER_H
31 #define NODELET_CALLBACK_QUEUE_MANAGER_H
37 #include <boost/shared_ptr.hpp>
38 #include <boost/scoped_array.hpp>
39 #include <boost/unordered_map.hpp>
40 #include <boost/thread/mutex.hpp>
41 #include <boost/thread/thread.hpp>
42 #include <boost/detail/atomic_count.hpp>
80 uint32_t getNumWorkerThreads();
95 , thread_index(0xffffffff)
110 typedef boost::unordered_map<CallbackQueue*, QueueInfoPtr>
M_Queue;
115 typedef std::vector<CallbackQueuePtr>
V_Queue;
130 std::vector<std::pair<CallbackQueuePtr, QueueInfoPtr> >
queue;
133 #ifdef NODELET_QUEUE_DEBUG
136 Record(
double stamp, uint32_t tasks,
bool threaded)
137 : stamp(stamp), tasks(tasks), threaded(threaded)
145 std::vector<Record> history;
150 static const int ACTUAL_SIZE =
151 sizeof(boost::mutex) +
152 sizeof(boost::condition_variable) +
153 sizeof(std::vector<std::pair<CallbackQueuePtr, QueueInfoPtr> >) +
154 sizeof(boost::detail::atomic_count);
155 uint8_t pad[((ACTUAL_SIZE + 63) & ~63) - ACTUAL_SIZE];
168 #endif // NODELET_CALLBACK_QUEUE_MANAGER_H