Exemplo n.º 1
0
        /// <summary>
        /// This method is used to manage logging using a single thread.
        /// </summary>
        /// <param name="state">The logged state.</param>
        protected override void SpinWrite(object state)
        {
            int wait = mProgress.TickWaitInMs;

            while (!mDisposed)
            {
                int count = WriteBuffer();
                if (count == 0)
                {
                    mProgress.ConsoleAction();
                }

                mReset.Reset();
                mReset.Wait(wait);
            }
        }