Add note regarding why the `realmRetrievalLock` return is done on the async thread

This commit is contained in:
Dean Herbert 2022-07-05 16:23:10 +09:00
parent 5adec2c738
commit 33db508301
1 changed files with 2 additions and 0 deletions

View File

@ -920,6 +920,8 @@ public IDisposable BlockAllOperations(string reason)
void restoreOperation() void restoreOperation()
{ {
// Release of lock needs to happen here rather than on the update thread, as there may be another
// operation already blocking the update thread waiting for the blocking operation to complete.
Logger.Log(@"Restoring realm operations.", LoggingTarget.Database); Logger.Log(@"Restoring realm operations.", LoggingTarget.Database);
realmRetrievalLock.Release(); realmRetrievalLock.Release();