https://kotlinlang.org logo
Title
s

Sebastian Kürten

01/06/2022, 9:29 PM
In our project we're using a lot of
mutableStateOf()
and a background thread for potentially longer running tasks that deliver data and alter state variables. Now sometimes buttons etc. also write to such state variables. Now we're wondering about thread safety and what kind of synchronization mechanisms we might need. I realize the state handling and snapshots do a lot of heavy lifting for us, but it would be really nice to read some documentation about that. I find next to nothing on that topic in the compose docs: https://developer.android.com/jetpack/compose/documentation We have found Zach's series "Compose state explained" https://dev.to/zachklipp/series/12895 and the articles there are very insightful. Still I'm wondering if there might be other "official" resources such as docs on those topics that we might have missed?
k

Kirill Grouchnikov

01/06/2022, 9:52 PM
This is better suited for the general #compose channel, since it's not desktop-specific
s

Sebastian Kürten

01/07/2022, 8:10 AM
right, good point, I'll repost there