syncPendingMutations method

Future<void> syncPendingMutations()

Implementation

Future<void> syncPendingMutations() async {
  if (_disposed) return;
  if (_syncLoopActive) {
    _resyncRequested = true;
    SdkLogger.d('Sync already in progress; follow-up sync requested');
    return;
  }
  _syncLoopActive = true;
  try {
    await _runSyncCycle();
    while (_takeResyncRequest()) {
      await _runSyncCycle();
    }
  } finally {
    _syncLoopActive = false;
  }
}