than to simply call sharedPrefsRepo.getSomePref() synchronously?
Patrick Kellison
02/11/2022, 2:43 PM
I'm assuming yes because the synchronous call blocks the UI thread, but I'm not actually sure
b
baxter
02/11/2022, 3:49 PM
It depends on when you call it. When a shared pref object is first created, it loads all the data to memory asynchronously, but will block any getter methods and edit until the data is loaded. Once the data is loaded, all reads are done from an underlying hashmap.