How to check if a channel is closed?
brutella opened this issue · 1 comments
brutella commented
In Go, I can check if a channel is closed by doing this.
ch := make(chan bool)
close(ch)
v, ok := <- ch
if !ok { // channel is closed
}
When I do a similar think in anko, I get an error: undefined symbol 'v'
.
ch = make(chan bool)
close(ch)
v, ok = <- ch // error: undefined symbol 'v'
Is there a way to check if a channel is closed in anko?
brutella commented
Sorry, this works as expected.