summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-05-29 22:43:38 +0200
committerCarl Hetherington <cth@carlh.net>2025-05-29 22:43:38 +0200
commitb4da9acff5148098ff80a500340513387809e514 (patch)
treed27c12cb9400d2b5262c893e8d9a58f75d0b9913 /src
parent1a132106ec790ec482b3848205d3ea471e25aa2b (diff)
Tidy up definition of grok_sent.
Diffstat (limited to 'src')
-rw-r--r--src/lib/grok/context.h1
-rw-r--r--src/lib/grok/messenger.cc5
-rw-r--r--src/lib/grok/messenger.h3
3 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/grok/context.h b/src/lib/grok/context.h
index 5f6697089..4cc1b7396 100644
--- a/src/lib/grok/context.h
+++ b/src/lib/grok/context.h
@@ -151,7 +151,6 @@ public:
};
_messenger = new Messenger(
- grokSentSynch,
clientReceiveReadySynch,
proc,
std::thread::hardware_concurrency()
diff --git a/src/lib/grok/messenger.cc b/src/lib/grok/messenger.cc
index eba3f2b6f..cee828434 100644
--- a/src/lib/grok/messenger.cc
+++ b/src/lib/grok/messenger.cc
@@ -30,10 +30,10 @@ 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";
auto constexpr GROK_TO_CLIENT_MESSAGE = "Global\\grok_to_client_message";
+auto constexpr GROK_SENT = "Global\\grok_sent";
Messenger::Messenger(
- std::string const& inSent,
std::string const& inReceiveReady,
std::function<void(std::string)> processor,
size_t numProcessingThreads
@@ -41,7 +41,6 @@ Messenger::Messenger(
: _running(true)
, _frames_scheduled(0)
, _frames_compressed(0)
- , _inbound_sent_synch(inSent)
, _inbound_receive_ready_synch(inReceiveReady)
, _processor(processor)
, _num_processing_threads(numProcessingThreads)
@@ -183,7 +182,7 @@ Messenger::startThreads()
_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());
+ _inbound_synch = new Synch(GROK_SENT, _inbound_receive_ready_synch.c_str());
_inbound = std::thread(&Messenger::inbound_thread, this);
for (size_t i = 0; i < _num_processing_threads; ++i) {
diff --git a/src/lib/grok/messenger.h b/src/lib/grok/messenger.h
index b03b9b77c..20713b726 100644
--- a/src/lib/grok/messenger.h
+++ b/src/lib/grok/messenger.h
@@ -33,7 +33,6 @@
namespace grk_plugin {
-static std::string grokSentSynch = "Global\\grok_sent";
static std::string clientReceiveReadySynch = "Global\\client_receive_ready";
static std::string grokUncompressedBuf = "Global\\grok_uncompressed_buf";
static std::string grokCompressedBuf = "Global\\grok_compressed_buf";
@@ -305,7 +304,6 @@ class Messenger
{
public:
Messenger(
- std::string const& inSent,
std::string const& inReceiveReady,
std::function<void(std::string)> processor,
size_t numProcessingThreads
@@ -411,7 +409,6 @@ private:
std::atomic<uint32_t> _frames_scheduled;
std::atomic<uint32_t> _frames_compressed;
- std::string _inbound_sent_synch;
std::string _inbound_receive_ready_synch;
std::function<void(std::string)> _processor;