Hi :slightly_smiling_face: I’m here from Louis’ me...
# splitties
w
Hi 🙂 I’m here from Louis’ mention in the other thread, I’m not sure how I missed Splitties, seems great! I’m looking through the available splits and have a question about lifecycle coroutines:
coroutineScope
and
lifecycleScope
and similarly defined to be
active until the Lifecycle[Owner] is destroyed.
. I’m not using coroutines in production yet, so maybe that’s a silly question, but do those scopes suspend if the lifecycle is in stopped state (similarly to LiveData waiting before delivering values)? Is it even possible (and reasonable) with scopes?
l
Hi! They don't, but AndroidX lifecycle KTX has it with
whenStarted
. I'll deprecate most of this split (
lifecycle-coroutines
) when AGP 3.6 is released (that fixes
Dispatchers.Main
performance issue), keeping only what's not in Lifecycle KTX.
w
when AGP 3.6 is released
what does AGP have to do with
Dispatchers.main
? Does it have something to do with the
Dispatchers.main.immediate
thing recently added to one of the androidx libraries (I think)?
w
Huh, pretty interesting, thanks 🙂
l
Of course, since Splitties is almost Kotlin-only (one Java file I can't convert in one module), I'll put
@Deprecated
annotations, so you can use it for now.