pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] lovelle commented on a change in pull request #3863: [cpp client] implement reference count for close()
Date Wed, 20 Mar 2019 18:20:32 GMT
lovelle commented on a change in pull request #3863: [cpp client] implement reference count
for close()
URL: https://github.com/apache/pulsar/pull/3863#discussion_r267482489
 
 

 ##########
 File path: pulsar-client-cpp/lib/ConsumerImpl.cc
 ##########
 @@ -110,6 +110,10 @@ Future<Result, ConsumerImplBaseWeakPtr> ConsumerImpl::getConsumerCreatedFuture()
     return consumerCreatedPromise_.getFuture();
 }
 
+void ConsumerImpl::incrRefCount() { ++refCount_; }
+
+bool ConsumerImpl::shouldTearDown() { return refCount_ > 0 ? refCount_-- == 0 : refCount_
== 0; }
 
 Review comment:
   Great! I agree that it should express the fact that is being decremented.
   I did it they way you mention If I understood correctly, please take a look now :+1: 

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message