chenyulin0719 commented on code in PR #1133:
URL: https://github.com/apache/yunikorn-core/pull/1133#discussion_r3873794827
##########
pkg/events/event_streaming.go:
##########
Review Comment:
The `time.After(1 * time.Second)` might close the channel in the production
code too early. A one-second delay seems normal with slow CPU/Network? I think
we should only close this channel on tear-down.
I prefer some thing just like:
```
select {
case consumer <- event:
case <-e.stopCh:
close(consumer)
return
case <-stop:
close(consumer)
return
}
```
--
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]