Alexey Ugnichev

50%
Flag icon
There is no way to test directly whether a channel has been closed, but there is a variant of the receive operation that produces two results: the received channel element, plus a boolean value, conventionally called ok, which is true for a successful receive and false for a receive on a closed and drained channel.
The Go Programming Language
Rate this book
Clear rating
Open Preview