BclExtras.Threading.ProgressTrackerProxy.OperationFinished C# (CSharp) Method

OperationFinished() private method

private OperationFinished ( ) : void
return void
        internal void OperationFinished()
        {
            lock (m_lock)
            {
                m_finished = true;

                // Close the tracker if it's open.  Make sure to invoke the close so
                // that it occurs on the proper thread
                if (m_tracker != null)
                {
                    // A race condition can occur as to who shuts down first so make sure to swallow
                    // that exception here
                    SafeInvoke.BeginInvokeNoThrow(
                        m_tracker,
                        () => m_factory.DestroyProgressTracker(m_tracker));
                }
            }
        }

Usage Example

Ejemplo n.º 1
0
        protected override void OnFutureCompletedCore()
        {
            base.OnFutureCompletedCore();

            lock (m_lock)
            {
                // Make sure to null out the thread.  That way if someone calls cancel
                // long after the future completes an abort won't occur
                Interlocked.Exchange <Thread>(ref m_futureThread, null);
            }

            m_proxy.OperationFinished();
        }