From 70d93ba82bf96457ad24ab6592b1dcc906d3cffc Mon Sep 17 00:00:00 2001 From: Patrick Roncagliolo Date: Mon, 16 Dec 2024 15:29:54 +0100 Subject: [PATCH] Add `get_thread` method to `RealtimePublisher` (#228) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --------- Signed-off-by: Patrick Roncagliolo Co-authored-by: Sai Kishor Kothakota Co-authored-by: Christoph Fröhlich --- include/realtime_tools/realtime_publisher.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/realtime_tools/realtime_publisher.hpp b/include/realtime_tools/realtime_publisher.hpp index 3ac1eb06..d1e9731e 100644 --- a/include/realtime_tools/realtime_publisher.hpp +++ b/include/realtime_tools/realtime_publisher.hpp @@ -182,6 +182,10 @@ class RealtimePublisher #endif } + std::thread & get_thread() { return thread_; } + + const std::thread & get_thread() const { return thread_; } + private: // non-copyable RealtimePublisher(const RealtimePublisher &) = delete;