onionshare-android
onionshare-android copied to clipboard
Review code for thread-safety issues
So far, we use MutableStateFlows that get updated from Kotlin coroutines on Dispatchers.IO which maybe use several I/O threads. We should check if there's any issues with that like if we always see the latest value, if we can access the value from any thread, etc.
This is how getter and setter are implemented: https://github.com/Kotlin/kotlinx.coroutines/blob/b231887c3214187cf7f09a74073f84383a487b71/kotlinx-coroutines-core/common/src/flow/StateFlow.kt#L309