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.
Sendis a suspend function. What will make my code(not the thread) wait for it to finish. So it keep running after the event insidesendwas complete/cancelled. OR it will be suspend only until I can queue the event/receive it?- This means that, if I use
sendfrom one channel to another, the first channel will be block until the second can receive/queue? - If I have a Rendezvous Channel and it is already running something (on suspend for example, waiting API) and I
offera new even. This will makeofferthrows exception? Cause the channel is not receiving?
If you know any other main difference I would be glad to know.
Thanks in advance