Closed stevenvachon closed 3 years ago
Hi @stevenvachon, this seems to be an oversight in that the END_OF_CHANNEL message was not properly handled. #113 should fix it.
But also you need to remove this case from your select statement:
case msg := <-comp.Channel().Messages():
That is preventing the computation from getting the messages (channel messages can only be gotten by one receiver) and so the metadata won't be cached properly.
Also I would recommend using the pattern
for msg := range comp.Data() {
...
}
as once the fix is merged and you upgrade, the for loop with automatically exit when the computation is over.
I originally didn't have that case
, but added it because the computation was not completing. The behaviour hasn't changed since adding it. I'll try using that PR. Thanks!
Your changes solve my problem! Thanks again so much!
After logging a few data and "no data available", it just continues on forever logging "for 1", "default" and "for 2":