Ejemplo n.º 1
0
        /// <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 _);
     }
 }
Ejemplo n.º 3
0
        /// <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;
            }
        }
Ejemplo n.º 4
0
        /// <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();
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Dispose the iterator
 /// </summary>
 public void Dispose()
 {
     frame?.Dispose();
 }