Rolbin
11/05/2020, 1:43 PMCasey Brooks
11/05/2020, 3:11 PMsuspendCancellableCoroutine
, which allows you to “wait” for a result without blocking a thread. runBlocking
shouldn’t really be used anywhere but a main()
function https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/suspend-cancellable-coroutine.htmlRolbin
11/06/2020, 7:23 AMrunBlocking
as a solution.