private void AbortThreadState(ThreadState perThread, ISet <string> newFiles) { if (Debugging.AssertsEnabled) { Debugging.Assert(perThread.IsHeldByCurrentThread); } if (perThread.IsActive) // we might be closed { if (perThread.IsInitialized) { try { SubtractFlushedNumDocs(perThread.dwpt.NumDocsInRAM); perThread.dwpt.Abort(newFiles); } finally { perThread.dwpt.CheckAndResetHasAborted(); flushControl.DoOnAbort(perThread); } } else { flushControl.DoOnAbort(perThread); } } else { if (Debugging.AssertsEnabled) { Debugging.Assert(closed); } } }
private void AbortThreadState(ThreadState perThread, ISet <string> newFiles) { //Debug.Assert(perThread.HeldByCurrentThread); if (perThread.Active) // we might be closed { if (perThread.Initialized) { try { SubtractFlushedNumDocs(perThread.Dwpt.NumDocsInRAM); perThread.Dwpt.Abort(newFiles); } finally { perThread.Dwpt.CheckAndResetHasAborted(); FlushControl.DoOnAbort(perThread); } } else { FlushControl.DoOnAbort(perThread); } } else { Debug.Assert(Closed); } }