void StorageAreaSync::scheduleFinalSync() { ASSERT(isMainThread()); // FIXME: We do this to avoid races, but it'd be better to make things safe without blocking. blockUntilImportComplete(); if (m_syncTimer.isActive()) m_syncTimer.stop(); else { // The following is balanced by the call to enableSuddenTermination in the // syncTimerFired function. disableSuddenTermination(); } // FIXME: This is synchronous. We should do it on the background process, but // we should do it safely. syncTimerFired(&m_syncTimer); m_finalSyncScheduled = true; }
void StorageAreaSync::scheduleFinalSync() { ASSERT(isMainThread()); // FIXME: We do this to avoid races, but it'd be better to make things safe without blocking. blockUntilImportComplete(); m_storageArea = 0; // This is done in blockUntilImportComplete() but this is here as a form of documentation that we must be absolutely sure the ref count cycle is broken. if (m_syncTimer.isActive()) m_syncTimer.stop(); else { // The following is balanced by the call to enableSuddenTermination in the // syncTimerFired function. disableSuddenTermination(); } // FIXME: This is synchronous. We should do it on the background process, but // we should do it safely. m_finalSyncScheduled = true; syncTimerFired(&m_syncTimer); m_syncManager->scheduleDeleteEmptyDatabase(this); }
void StorageAreaSync::scheduleSync() { syncTimerFired(); }