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
shikasd
06/19/2024, 6:46 PM
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.