Attempt to set a ceph_timer thread name using the ceph_pthread_setname()
compatibility macro.
Having an explicit thread name set is useful for debugging purposes.
Signed-off-by: David Disseldorp <ddiss@suse.de>
#include <boost/intrusive/set.hpp>
#include "include/function2.hpp"
+#include "include/compat.h"
namespace bi = boost::intrusive;
namespace ceph {
public:
timer() : suspended(false) {
thread = std::thread(&timer::timer_thread, this);
+ ceph_pthread_setname(thread.native_handle(), "ceph_timer");
}
// Create a suspended timer, jobs will be executed in order when