gunli opened a new issue, #845:
URL: https://github.com/apache/pulsar-client-go/issues/845

   #### Expected behavior
   ``` go
   func (s *semaphore) Release() {
        permits := atomic.AddInt32(&s.permits, -1)
        if permits >= s.maxPermits {
                // Unblock the next in line to acquire the semaphore
                s.ch <- true
        }
   }
   ```
   I think we should unblock when permits < s.maxPermits
   
   #### Actual behavior
   
   but we unblock here when permits >= s.maxPermits, which indicating no 
available permits. It really confused me.
   
   #### Steps to reproduce
   
   
   
   #### System configuration
   
   @merlimat 


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