From f2f3f3bb71fb7c298c1f828abd6211fd1ddc4583 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 29 May 2025 22:38:17 +0200 Subject: Tidy up definition of grok_receive_ready. --- src/lib/grok/context.h | 1 - src/lib/grok/messenger.cc | 5 ++--- src/lib/grok/messenger.h | 4 ---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/lib/grok/context.h b/src/lib/grok/context.h index 290c3829b..5e0e0a42d 100644 --- a/src/lib/grok/context.h +++ b/src/lib/grok/context.h @@ -151,7 +151,6 @@ public: }; _messenger = new Messenger( - grokReceiveReadySynch, grokToClientMessageBuf, grokSentSynch, clientReceiveReadySynch, diff --git a/src/lib/grok/messenger.cc b/src/lib/grok/messenger.cc index 6a973a059..bab554d54 100644 --- a/src/lib/grok/messenger.cc +++ b/src/lib/grok/messenger.cc @@ -28,10 +28,10 @@ using namespace grk_plugin; auto constexpr CLIENT_TO_GROK_MESSAGE = "Global\\client_to_grok_message"; auto constexpr CLIENT_SENT = "Global\\client_sent"; +auto constexpr GROK_RECEIVE_READY = "Global\\grok_receive_ready"; Messenger::Messenger( - std::string const& outReceiveReady, std::string const& inBuf, std::string const& inSent, std::string const& inReceiveReady, @@ -41,7 +41,6 @@ Messenger::Messenger( : _running(true) , _frames_scheduled(0) , _frames_compressed(0) - , _outbound_receive_ready_synch(outReceiveReady) , _inbound_message_buf(inBuf) , _inbound_sent_synch(inSent) , _inbound_receive_ready_synch(inReceiveReady) @@ -182,7 +181,7 @@ Messenger::inbound_thread() void Messenger::startThreads() { - _outbound_synch = new Synch(CLIENT_SENT, _outbound_receive_ready_synch.c_str()); + _outbound_synch = new Synch(CLIENT_SENT, GROK_RECEIVE_READY); _outbound = std::thread(&Messenger::outbound_thread, this); _inbound_synch = new Synch(_inbound_sent_synch.c_str(), _inbound_receive_ready_synch.c_str()); diff --git a/src/lib/grok/messenger.h b/src/lib/grok/messenger.h index 451b8cf3e..b1dfdae09 100644 --- a/src/lib/grok/messenger.h +++ b/src/lib/grok/messenger.h @@ -36,7 +36,6 @@ namespace grk_plugin { static std::string grokToClientMessageBuf = "Global\\grok_to_client_message"; static std::string grokSentSynch = "Global\\grok_sent"; static std::string clientReceiveReadySynch = "Global\\client_receive_ready"; -static std::string grokReceiveReadySynch = "Global\\grok_receive_ready"; static std::string grokUncompressedBuf = "Global\\grok_uncompressed_buf"; static std::string grokCompressedBuf = "Global\\grok_compressed_buf"; static const std::string GRK_MSGR_BATCH_IMAGE = "GRK_MSGR_BATCH_IMAGE"; @@ -307,7 +306,6 @@ class Messenger { public: Messenger( - std::string const& outReceiveReady, std::string const& inBuf, std::string const& inSent, std::string const& inReceiveReady, @@ -415,8 +413,6 @@ private: std::atomic _frames_scheduled; std::atomic _frames_compressed; - std::string _outbound_receive_ready_synch; - std::string _inbound_message_buf; std::string _inbound_sent_synch; std::string _inbound_receive_ready_synch; -- cgit v1.2.3