You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/04/22 16:24:04 UTC

[GitHub] [qpid-proton] astitcher commented on a change in pull request #310: PROTON-2377: [cpp] Make tag_counter in sender.cpp atomic

astitcher commented on a change in pull request #310:
URL: https://github.com/apache/qpid-proton/pull/310#discussion_r618554739



##########
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:
       It would make a lot of sense (from a performance stand point) to have the tag counter be scoped to the connection in some way (as this is the serialisation granule of proton).
   Is it true that the delivery tags are only scoped to the sender then. So that different senders can use identical tags? if so we should just make this connection or more granularly scoped and just zero out the count when we create a new connection/session/sender/etc.




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org