merlimat commented on PR #15508:
URL: https://github.com/apache/pulsar/pull/15508#issuecomment-1121258950

   The problem is that the decrement and checking of the counter are not done 
in atomic fashion:
   
   ```cpp
       if (*numberOfOpenHandlers > 0) {
           --(*numberOfOpenHandlers);
       }
       if (*numberOfOpenHandlers == 0) {
           // .....
       }
   ```
   
   We should instead convert into: 
   
   ```cpp
       if (--(*numberOfOpenHandlers) == 0) {
           // .....
       }
   ```
   
   


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