bschofield commented on issue #662:
URL:
https://github.com/apache/pulsar-client-go/issues/662#issuecomment-963286629
In this code:
```
for c.getState() != connectionReady {
c.log.Debugf("Wait until connection is ready state=%s",
c.getState().String())
if c.getState() == connectionClosed {
return errors.New("connection error")
}
// wait for a new connection state change
c.cond.Wait()
}
```
If the state of the connection is changed to ready after the for statement,
but before `c.cond.Wait()` is called, what prevents a race condition?
--
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]