kotlin-coroutine-channel

Kotlin Channels usage difference between Send and Offer

≯℡__Kan透↙ 提交于 2020-06-17 00:07:58
问题 Channels have two functions that allow us to send events into it. Send and offer . I would like to understand better the difference between both. I have some statements I wanna check are true. Send is a suspend function. What will make my code(not the thread) wait for it to finish. So it keep running after the event inside send was complete/cancelled. OR it will be suspend only until I can queue the event/receive it? This means that, if I use send from one channel to another, the first