/// <summary> /// Dispose the iterator /// </summary> public void Dispose() { if (!disposed) { if (frame != null) { // Wait for ongoing reads to complete/fail for (int i = 0; i < loaded.Length; i++) { if (loadedPage[i] != -1) { try { loaded[i].Wait(loadedCancel[i].Token); } catch { } } } } // Dispose/unpin the frame from memory frame?.Dispose(); if (name != null) { fasterLog.PersistedIterators.TryRemove(name, out _); } disposed = true; } if (Interlocked.Decrement(ref fasterLog.logRefCount) == 0) { fasterLog.TrueDispose(); } }
/// <summary> /// Dispose the iterator /// </summary> public void Dispose() { frame?.Dispose(); if (name != null) { PersistedIterators.TryRemove(name, out _); } }
/// <summary> /// Dispose the iterator /// </summary> public override void Dispose() { if (!disposed) { base.Dispose(); // Dispose/unpin the frame from memory frame?.Dispose(); // Wait for ongoing page flushes if (Interlocked.Decrement(ref issuedFlush) == 0) { completedSemaphore.Release(); } completedSemaphore.Wait(); // Dispose flush buffer buffer?.Dispose(); disposed = true; } }
/// <summary> /// Dispose the iterator /// </summary> public override void Dispose() { if (!disposed) { base.Dispose(); // Dispose/unpin the frame from memory frame?.Dispose(); if (name != null) { fasterLog.PersistedIterators.TryRemove(name, out _); } disposed = true; } if (Interlocked.Decrement(ref fasterLog.logRefCount) == 0) { fasterLog.TrueDispose(); } }
/// <summary> /// Dispose the iterator /// </summary> public void Dispose() { frame?.Dispose(); }