Goroutine leak or never stop
Petelin opened this issue · comments
lin commented
i am new with hystrix, but shouldn't have a hard timeout limit? i read the code, when time is up it just return timeout err, but the real job is running in another goroutine and may be never be stoped. am i right with this?should it be solve?
hystrix.Go("test_name", func() error {
for{
log.Println("hello hystrix")
time.Sleep(time.Microsecond * 100)
}
return errors.New("test return err")
}, func(e error) error {
log.Println("ops~ got err!", e)
return errors.New("second error")
})
lin commented
i seems we should do this by ourself. there is no safe way to close a goroutine.