private void RetryFailedActions() { lock (workQueue) { if (workQueue.Count == 0) { return; } if (Utility.CurrentTime().Subtract(lastAttempt) >= RetryInterval) { indexer.Unlock(); lastAttempt = DateTime.Now; ExecuteEnqueuedActionsAsync(); } } }
private void RetryFailedActions() { if (errorQueue.Count == 0) { return; } if (Utility.CurrentTime().Subtract(lastAttempt) >= RetryInterval) { lock (errorQueue) { indexer.Unlock(); lastAttempt = DateTime.Now; while (errorQueue.Count > 0) { DoWork(errorQueue.Dequeue()); } } } }
/// <summary>Unlocks the index.</summary> public virtual void Unlock() { indexer.Unlock(); }