Skip to content

Commit

Permalink
iox-eclipse-iceoryx#2330 Rename listen_thread_watchdog to m_listen_th…
Browse files Browse the repository at this point in the history
…read_watchdog

Standardize the naming convention for the listen thread watchdog variable to match the member variable naming pattern. This change ensures consistency and improves code readability.
  • Loading branch information
khromenokroman committed Aug 22, 2024
1 parent e09617a commit 76dd33f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion iceoryx_posh/include/iceoryx_posh/internal/roudi/roudi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class RouDi
std::thread m_monitoringAndDiscoveryThread;
std::thread m_handleRuntimeMessageThread;
#ifdef USE_SYSTEMD
std::thread listen_thread_watchdog; // 8
std::thread m_listen_thread_watchdog; // 8
#endif

protected:
Expand Down
8 changes: 4 additions & 4 deletions iceoryx_posh/source/roudi/roudi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ void RouDi::shutdown() noexcept
* the 'listen_thread_watchdog' has finished, hence ensuring a
* proper termination of the entire application.
*/
if (listen_thread_watchdog.joinable()) {
listen_thread_watchdog.join();
if (m_listen_thread_watchdog.joinable()) {
m_listen_thread_watchdog.join();
}
#endif

Expand Down Expand Up @@ -274,7 +274,7 @@ void RouDi::processRuntimeMessages(runtime::IpcInterfaceCreator&& roudiIpcInterf
if (invocation_id != nullptr)
{
IOX_LOG(WARN, "Run APP in unit(systemd)");
listen_thread_watchdog = std::thread([this] {
m_listen_thread_watchdog = std::thread([this] {
if (auto wdres = sd_notify(0, "READY=1") < 0)
{
std::array<char, SIZE_ERROR_MESSAGE> buf{};
Expand All @@ -297,7 +297,7 @@ void RouDi::processRuntimeMessages(runtime::IpcInterfaceCreator&& roudiIpcInterf
std::this_thread::sleep_for(std::chrono::seconds(1));
}
});
if (pthread_setname_np(listen_thread_watchdog.native_handle(), "watchdog") != 0)
if (pthread_setname_np(m_listen_thread_watchdog.native_handle(), "watchdog") != 0)
{
std::array<char, SIZE_ERROR_MESSAGE> buf{};
strerror_r(errno, buf.data(), buf.size());
Expand Down

0 comments on commit 76dd33f

Please sign in to comment.