gemmellr commented on a change in pull request #310:
URL: https://github.com/apache/qpid-proton/pull/310#discussion_r618594097
##########
File path: cpp/src/sender.cpp
##########
@@ -60,14 +61,20 @@ class target sender::target() const {
}
namespace {
-// TODO: revisit if thread safety required
-uint64_t tag_counter = 0;
+std::atomic<uint64_t> tag_counter(0);
Review comment:
>To be clear if we can make the tag counter scoped to the connection or
lower then we don't need any thread synchronisation at all. This is because it
is an underlying assumption in proton that a connection can only be processed
on a single thread at a time.
Yep, thats what pompted my original reply on the other PR, when I thought
the variable was sender-specific, before it was pointed out it was actually a
global variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]