The second validation would be to check whether there is something to receive. This can be done using the isEmpty property:
val channel = Channel<Int>(1)
channel.isEmpty // true
channel.send(10)
channel.isEmpty // false
The second validation would be to check whether there is something to receive. This can be done using the isEmpty property:
val channel = Channel<Int>(1)
channel.isEmpty // true
channel.send(10)
channel.isEmpty // false
3.16.135.225