Hey folks, how are you doing? I'd like to know if it's ok to execute a SharedPreferences task inside a Coroutine. I'm just dealing with primitive types so it's just out of curiosity
g
gildor
08/11/2020, 1:43 AM
SharePreferences blocks thread on first access and on commit()
This also true when you use it without coroutines. So if you want very strict about blocking, you should wrap access to shared preferences to Dispatcher.IO