コード例 #1
0
        //since sometimes we terminate thread via Thread.Abort() it's quite normal to catch this abort
        private void ThreadProcCatchAbort()
        {
            try
            {
                ThreadProc();
            }
            catch (ThreadAbortException e)
            {
                LogLog.Info($"ByteBufferProcessor {Id} was stopped by Thread.Abort rather than by normal Stop(): {0}", e);

                Thread.ResetAbort();
            }
        }
コード例 #2
0
        //since sometimes we terminate thread via Thread.Abort() it's quite normal to catch this abort
        private void ThreadProcCatchAbort()
        {
            try
            {
                UnsafeWriter.AllowUnsafeWriterCaching = true;
                ThreadProc();
            }
            catch (ThreadAbortException e)
            {
                LogLog.Info($"ByteBufferProcessor {Id} was stopped by Thread.Abort rather than by normal Stop(): {0}", e);

                Thread.ResetAbort();
            }
            finally
            {
                UnsafeWriter.AllowUnsafeWriterCaching = false;
            }
        }