shibd commented on code in PR #21:
URL: https://github.com/apache/pulsar-client-cpp/pull/21#discussion_r991019314


##########
lib/ConsumerImpl.h:
##########
@@ -159,7 +160,8 @@ class ConsumerImpl : public ConsumerImplBase,
     ConsumerStatsBasePtr consumerStatsBasePtr_;
 
    private:
-    bool waitingForZeroQueueSizeMessage;
+    volatile bool waitingForZeroQueueSizeMessage;

Review Comment:
   Thank your reminder, Here is to ensure visibility on the multi-thread. I 
consulted the information and `volatile ` in C++ is not guaranteed.
   
   I replaced it with `atomic_bool`, PTAL.
   



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