ursus
04/29/2021, 3:09 AMclass Foo(coroutineScope) {
fun bar() {
coroutineScope.launch {
...
}
}
}
This however does not compose as its not s suspend function 😑
What to do if a blocking function is needed for some legacy component?
If it were a suspend function, that legacy component might call it from within a runBlocking block
If however its a plain function, now I need to add a barBlocking as well to the api, which is ..ughh, not scaling wellstreetsofboston
04/29/2021, 4:02 AMuli
04/29/2021, 7:35 AMto keep the suspend functions running no matter the ui
This however does not compose
. What is your issue with the non-suspending approach?ursus
04/29/2021, 7:47 AMfun FirebaseMessagingService.onMessageReceived() {
runBlocking { thingThatWouldBeLaunchedInFoo() }
}