This mixin allows the nodelet to update the OS name of the thread in which it is currently executing.
More...
#include <thread_name_updating_nodelet.hpp>
template<typename NodeletType = ::nodelet::Nodelet>
class cras::ThreadNameUpdatingNodelet< NodeletType >
This mixin allows the nodelet to update the OS name of the thread in which it is currently executing.
- Template Parameters
-
NodeletType | Type of the base nodelet. |
Definition at line 21 of file thread_name_updating_nodelet.hpp.
◆ ~ThreadNameUpdatingNodelet()
template<typename NodeletType = ::nodelet::Nodelet>
◆ updateThreadName()
template<typename NodeletType = ::nodelet::Nodelet>
Set custom name of the current thread to this nodelet's name.
- Note
- The name will be automatically shortened if longer than 15 chars.
-
You can see the custom names in htop when you enable display of custom thread names in options.
-
This function doesn't reset the name back to the original.
-
You should call this function at the beginning of all your callbacks.
-
This function is actually pretty fast. It can be called more than 1 million times per second.
The documentation for this class was generated from the following file: