我很好奇 SharedPreferences 在哪个线程上替代 - Preferences DataStore 操作 - 读取和写入数据。
我搜索了信息但找不到任何信息,只有一篇文章 - 这篇文章https://medium.com/@vgoyal_1/datastore-android-how-to-use-it-like-a-pro-using- kotlin-2c2440683d78,这是我看到的第一个地方提到操作是在哪个线程上执行的。
正如 DataStore 代码实验室所述 - Dispatchers.IO - https://developer.android.com/codelabs/android-proto-datastore#3