pavel.v
04/14/2019, 9:09 AMtseisel
04/14/2019, 9:27 AMsendBlocking
(mostly equivalent to send
wrapped in runBlocking
), or offer
. Only use the latter if you don't mind losing some messages if the last received one has not been processed yet, or if your channel has a large capacityPaul Woitaschek
04/14/2019, 9:53 AMpavel.v
04/14/2019, 9:58 AMtseisel
04/14/2019, 10:30 AMCONFLATED
, send
does not suspend and offer
always returns true
(but the newly sent message will overwrite previous ones)tseisel
04/14/2019, 10:48 AMPaul Woitaschek
04/14/2019, 11:45 AMstreetsofboston
04/14/2019, 1:03 PMCoroutineScope
and wrapping the call to send
inside a launch
?tseisel
04/14/2019, 3:32 PMsendBlocking
would block the thread issuing the callback (often the main thread).