BewareMyPower commented on code in PR #16940:
URL: https://github.com/apache/pulsar/pull/16940#discussion_r939774330
##########
pulsar-client-cpp/lib/PartitionedConsumerImpl.h:
##########
@@ -92,7 +92,7 @@ class PartitionedConsumerImpl : public ConsumerImplBase,
mutable std::mutex consumersMutex_;
mutable std::mutex mutex_;
std::mutex pendingReceiveMutex_;
- PartitionedConsumerState state_ = Pending;
+ std::atomic<PartitionedConsumerState> state_ = {Pending};
Review Comment:
```suggestion
std::atomic<PartitionedConsumerState> state_{Pending};
```
--
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]