Is it possible to check whether sending to Channel...
# coroutines
c
Is it possible to check whether sending to Channel will suspend without actually sending anything? I know, that there is
isFull()
function on SendChannel, but that is depracated without replacement
Or maybe it is considered no-go approach. Channel is concurrent, and whatever info you may get from isFull() may not be relevant in a nanosecond?
b
You can use
channel.offer(value)
if it returned false suspension required. Otherwise it was sent