Race condition closing errCh
brildum opened this issue · 0 comments
brildum commented
There is currently a race condition caused by closing the chan error
returned by hystrix.Go
. Despite hystrix.Go
having no errors, receives on the error channel can succeed, hiding receives on output channels.
Below is a simple example to illustrate:
out := make(chan bool, 1)
errs := hystrix.Go("command", func() error {
out <- true
return nil
}, nil)
select {
case x := <-out:
// this sometimes won't execute
case err := <-errs:
// this can execute, despite there being no errors
}