It is easier illustrate with channels. So channels...
# coroutines
e
It is easier illustrate with channels. So channels have
send
and
receive
, but also have
onSend
and
onReceive
to be used in
select
, so that you can do :
Copy code
select {
   channel1.onReceive { doSomething(it) }
   channel2.onReceive { doSomething(it) }
}