From 25eb5f02688a01ee4d255798efcc1d0586ff9d96 Mon Sep 17 00:00:00 2001 From: "guoan.chen" Date: Wed, 26 Feb 2025 16:41:19 +0800 Subject: [PATCH] [C++ Wrapper] tidy up AgentRunner.h and AgentInvoker.h construction function --- aeron-client/src/main/cpp_wrapper/concurrent/AgentInvoker.h | 4 ++-- aeron-client/src/main/cpp_wrapper/concurrent/AgentRunner.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aeron-client/src/main/cpp_wrapper/concurrent/AgentInvoker.h b/aeron-client/src/main/cpp_wrapper/concurrent/AgentInvoker.h index 9f10fde0ad..ddf6cd6f3a 100644 --- a/aeron-client/src/main/cpp_wrapper/concurrent/AgentInvoker.h +++ b/aeron-client/src/main/cpp_wrapper/concurrent/AgentInvoker.h @@ -31,7 +31,7 @@ template class AgentInvoker { public: - AgentInvoker(Agent &agent, util::exception_handler_t &exceptionHandler) : + AgentInvoker(Agent &agent, const util::exception_handler_t &exceptionHandler) : m_agent(agent), m_exceptionHandler(exceptionHandler) { @@ -140,7 +140,7 @@ class AgentInvoker private: Agent &m_agent; - util::exception_handler_t &m_exceptionHandler; + const util::exception_handler_t &m_exceptionHandler; bool m_isStarted = false; bool m_isRunning = false; bool m_isClosed = false; diff --git a/aeron-client/src/main/cpp_wrapper/concurrent/AgentRunner.h b/aeron-client/src/main/cpp_wrapper/concurrent/AgentRunner.h index 6e24bb0c18..c550e660a1 100644 --- a/aeron-client/src/main/cpp_wrapper/concurrent/AgentRunner.h +++ b/aeron-client/src/main/cpp_wrapper/concurrent/AgentRunner.h @@ -37,7 +37,7 @@ template class AgentRunner { public: - AgentRunner(Agent &agent, IdleStrategy &idleStrategy, util::exception_handler_t &exceptionHandler) : + AgentRunner(Agent &agent, IdleStrategy &idleStrategy, const util::exception_handler_t &exceptionHandler) : m_agent(agent), m_idleStrategy(idleStrategy), m_exceptionHandler(exceptionHandler), @@ -48,7 +48,7 @@ class AgentRunner AgentRunner( Agent &agent, IdleStrategy &idleStrategy, - util::exception_handler_t &exceptionHandler, + const util::exception_handler_t &exceptionHandler, const std::string &name) : m_agent(agent), m_idleStrategy(idleStrategy), @@ -197,7 +197,7 @@ class AgentRunner private: Agent &m_agent; IdleStrategy &m_idleStrategy; - util::exception_handler_t &m_exceptionHandler; + const util::exception_handler_t &m_exceptionHandler; std::atomic m_isStarted = { false }; std::atomic m_isRunning = { false }; std::atomic m_isClosed = { false };