Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-13

Add tryBeginWrite for write transactions

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      For writing on the main-thread - if sync is writing in the background the write fails and dispatching to a background thread is cumbersome because

      It’s super inefficient - to write a value on a background thread, you need to get a thread safe reference to your object, start a new thread, open the Realm there, resolve the thread safe reference, write the value, then close the Realm, go back on your main thread, and force refresh the Realm so you get the new values.
      Compare that to a design where you do something like `await realm.beginWriteAsync()`
      

      requested via PostNord through @nirinchev

      Original discussion here:
      https://realmio.slack.com/archives/CA3J67WGH/p1530268988000018
      2nd discussion:
      https://realmio.slack.com/archives/CA3J67WGH/p1525335131000083

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

              Created:
              Updated:
              Resolved: