Skip to content

Commit 7f8b357

Browse files
committed
Remove unnecessary const ref on Pulse's OMQ thread ID
The thread ID is designed to be safe and cheap to copy (it's internally just an int, or, 4 bytes on a majority modern platforms). This member is used in different threads (i.e. the OMQ worker threads) and reads are atomic so it also helps with a potential race condition in certain contexts (like the local devnet).
1 parent bb99e64 commit 7f8b357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cryptonote_core/cryptonote_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ class core final {
831831
std::unordered_map<crypto::x25519_public_key, oxenmq::AuthLevel>& _omq_auth_level_map() {
832832
return m_omq_auth;
833833
}
834-
oxenmq::TaggedThreadID const& pulse_thread_id() const { return *m_pulse_thread_id; }
834+
oxenmq::TaggedThreadID pulse_thread_id() const { return *m_pulse_thread_id; }
835835

836836
/// Service Node's storage server and lokinet version
837837
std::array<uint16_t, 3> ss_version;

0 commit comments

Comments
 (0)