pardom
02/19/2019, 4:35 PMpardom
02/19/2019, 4:35 PMpardom
02/19/2019, 4:41 PMDico
02/19/2019, 5:12 PM<http://Dispatchers.IO|Dispatchers.IO>
is platform specific.
I would recommend that you invoke runtimeScope.cancel()
when you want to dispose of the coroutine. Just make sure that its context contains a Job()
or SupervisorJob()
.
Finally, I would say you should join()
on your render coroutine before launching it again. You might be able to use a channel to communicate with a render thread.Dico
02/19/2019, 5:13 PMDico
02/19/2019, 5:14 PMDico
02/19/2019, 5:16 PMchannel.offer
failed, as it will not fail unless the channel is closed or cancelled. That is a property of conflated channels.Dico
02/19/2019, 5:16 PMpardom
02/19/2019, 5:17 PMthere’s no point checking that theCool, I was looking for other instances it might fail, but I couldn’t find any so I’m catching it to be cautious.failedchannel.offer
pardom
02/19/2019, 5:19 PMpardom
02/19/2019, 5:21 PMDico
02/19/2019, 5:30 PMdispatch
block to both effect
and view
calls. Do you expect multiple updates in a single cycle?pardom
02/19/2019, 5:40 PMpardom
02/19/2019, 5:47 PMpardom
02/19/2019, 5:48 PM