Realm database locking?
<p>On sync I overwrite all my local data with the server's data. For this I first call <code>realm.delete(realm.objects(MyObj))</code> for all my objects. Then I save the response's objects with <code>realm.add(obj, update: false)</code>. Everything is in a single transaction. The payload can take a while to process but it's not big enough to justify implementing pagination.</p>

<p>Can the user use the app normally during this process? Can they store new items that are deleted in the clearing part of the transaction, or that would trigger an error or be overwritten during the adding part? If yes how can I avoid this?</p>