Commentary on who owns what among Loader, Nodelet, CallbackQueue and CallbackQueueManager.
Moved most of Loader's member variables into an opaque PIMPL struct so we can change things without breaking ABI.
All bond code moved to LoaderROS. Loader no longer needs to know about bond.
Removed CallbackQueue::disable(). Loader removes a nodelet's queues from the queue manager when unloading it, which is sufficient to prevent new callbacks for that nodelet getting added.
Removed some code and comments concerned with callbacks getting called after their nodelet's destruction. This can't actually happen anymore, since callbacks only fire if they can lock a weak_ptr to their parent nodelet.
Refactoring to streamline Nodelet back down to a simple plugin interface. It no longer knows about detail::CallbackQueue[Manager] or Bond; init() simply takes the single- and multi-threaded ros::CallbackQueueInterface* instead (defaulting to NULL). Loader owns the callback queues and bond for each nodelet. This makes it possible to use Nodelet without all the surrounding infrastructure.
Take Bond pointers as const-ref instead of value in Loader and Nodelet.
Added Loader constructor taking a boost::function object used as a factory for
nodelet instances, replacing the default use of a pluginlib class loader. This
is to support ROSGUI, which defines its specialized plugin interface as a
subclass of Nodelet, and thus needs a different class loader.
Removed some debug code in Loader constructor.
'nodelet load' more reliably unloads the nodelet on exiting. In particular it intercepts XML-RPC shutdown command, used for example by 'rosnode kill'.
Enabled error output when service calls fail abnormally.
Rewrote tracked_object logic to be clearer.
Have detail::CallbackQueue use a ros::VoidConstWPtr as the tracked object, which is now optional. More generic, and fixes test_nodelet which was broken by the last commit.
Fixed race conditions/deadlocks when unloading a nodelet. Now disable the nodelet's callback queues before deleting it. The queues have a WPtr to the nodelet, so any outstanding callbacks will get discarded.
~Loader now stops callback manager threads before destroying the nodelets. Otherwise the worker threads could operate on nodelet data as/after it's destroyed.
Use ros::names::parentNamespace().
Cleaned scoped_ptr's out of ThreadInfo and updated its padding.
Made ThreadInfo::calling an atomic_count. This allows the manager thread to pick the queue with least work more accurately, and reduces contention b/c getSmallestQueue no longer needs to lock on queue_mutex_.
Minor code cleanup and finer locking in managerThread().
Actually pad ThreadInfo to a multiple of 64 bytes. Previous expression was wrongly wrapped in sizeof().
Instead of thread_info_.resize(num_threads), push each ThreadInfo on individually. With resize(), all threads ended up sharing the same queue_mutex and queue_cond. Doesn't seem to be much of a performance win though.
Added test instrumentation to CallbackQueueManager to track size of worker thread queues over time. Must be enabled at compilation time with -DNODELET_QUEUE_DEBUG.
nodelet patches for osx lion support from wjwwood
Added --no-bond option to nodelet loading to disable bonds.
updated platform tags
don't need to link against tinyxml directly
link against system tinyxml
Fix for #4855
This fix actually makes sense, but that it wasn't caught earlier
doesn't. The construction of
nodelet::Loader n(false)
was creating the first node handle and letting it go out of scope,
which was automagically calling ros::shutdown(), which is a dumb thing
for ros::NodeHandle to do automagically on destruction.
Each nodelet now places its bonds on a custom callback queue
MUX simplified by using a 8-connected null filters
DeMUX has a specialization for message type (uses ros::Subscriber internally by default)
Added rosdep for nodelet (uuid)
adding optional namespace aware constructor to nodelet loader. #4243 and fixing vestigial comments referencing Filters #4221
nodelet uses bond to handle crashes on the manager or the spawner end. #4221
locking in all cases
fix hang on CallbackQueueManager destruction (#4402)
better check for services
fix hanging tests and a hang on nodelet CallbackQueueManager destruction (#4082)
added a boost mutex
preventing nodelets from busywaiting
Added optional parameter num_worker_threads to nodelets.