You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/10/10 08:18:20 UTC

[GitHub] [pulsar-client-cpp] shibd commented on a diff in pull request #21: [feat] Consumer support batch receive messages.

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org