-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Local
-
None
-
2 - S (<= 1 week)
-
2
-
576
Similar to Realm Java we should prevent people from making performance mistakes by querying or writing on the UI thread.
Given some KMP targets might not have a dedicated UI thread, we do need to decide what to do there:
- Ignore these settings on e.g. JVM
- Use Dispatchers.Main as proxy, i.e assume this dispatcher i single-threaded and verify using its Id. Unclear how this impact testing code though.
- Naming: Should we use the concept of uiThread (which is what really matters) or mainThread (which would match us checking the Main dispatcher.
Suggested API:
Unable to find source-code formatter for language: kotlin. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
RealmConfiguration.Builder.allowQueriesOnUiThread(enabled: Boolean = true) RealmConfiguration.Builder.allowWritesOnUiThread(enabled: Boolean = true)
- is depended on by
-
RKOTLIN-371 Story: RealmConfiguration
- Closed