Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-543

Detect Main thread usage

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Local
    • None

      On Realm Java we have a number of API's with behaviour that requires knowing if code is running on the main thread:

      • SyncConfiguration.waitForInitialRemoteData() will throw if Realm.open is called on main thread.
      • Realm.writeBlocking and Configuration.allowWritesOnUiThread()
      • Realm.query().find() and Configuration.allowQueriesOnUiThread()

      However "Main thread" is a bit of a loose concept across all the platforms KMP support. In order to support the above use cases we need to figure out what exactly we mean by the main thread and how to efficiently detect if we are on it.

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: