shibd commented on code in PR #16940:
URL: https://github.com/apache/pulsar/pull/16940#discussion_r939621227


##########
pulsar-client-cpp/lib/ConsumerImpl.cc:
##########
@@ -303,7 +299,6 @@ void ConsumerImpl::unsubscribeAsync(ResultCallback 
callback) {
 
 void ConsumerImpl::handleUnsubscribe(Result result, ResultCallback callback) {
     if (result == ResultOk) {
-        Lock lock(mutex_);
         state_ = Closed;

Review Comment:
   Have a question:
   
   What is the difference between direct assignment and `state_.store()`? Is 
there a visibility issue with the direct assignment?
   



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to