Mehdi Haghgoo
09/07/2020, 5:48 PMWhen a composable function is invoked, the invocation might occur on a different thread from the caller. That means code that modifies variables in a composable lambda should be avoided–both because such code is not thread-safe, and because it is an impermissible side-effect of the composable lambda. -link
Parallel execution in Compose is very new to me. Could someone tell me please how I can modify variables if I am not allowed to do it in a Composable lamda? Also, what does thread-safety mean in the above paragraph?
manueldidonna
09/07/2020, 5:59 PMonCommit
or launchInComposition
This thread has been very useful to me https://kotlinlang.slack.com/archives/CJLTWPH7S/p1591653158447300?thread_ts=1591653158.447300&cid=CJLTWPH7Ssante
09/07/2020, 8:01 PM