I wonder why SideEffect <documentation page> doesn...
# compose
d
I wonder why SideEffect documentation page doesn't mention what thread coroutines will be launched on. Will it be main thread always? Or render thread? I need to know that when invoking side-effecting misc callbacks in effects.
s
Do you mean
LaunchedEffect
? Technically it can be configured when
Recomposer
is created, you can provide
effectCoroutineContext
in constructor. The rest of the effects are invoked on the same thread as composition (
setContent
) and the main clock. Practically, it is the main thread by default.
1
🙏 1