Пример #1
0
        /// <summary>
        /// Runs pip asynchronously
        /// </summary>
        protected async Task RunCoreAsync(RunnablePip runnablePip)
        {
            DispatcherReleaser releaser = new DispatcherReleaser(this);
            int tid = -1;

            if (runnablePip.IncludeInTracer)
            {
                m_stack.TryPop(out tid);
                runnablePip.ThreadId = tid;
            }

            try
            {
                // Unhandled exceptions (Catastrophic BuildXL Failures) during a pip's execution will be thrown here without an AggregateException.
                await runnablePip.RunAsync(releaser);
            }
            finally
            {
                if (tid != -1)
                {
                    m_stack.Push(tid);
                }

                releaser.Release();
                m_pipQueue.DecrementRunningOrQueuedPips(); // Trigger dispatching loop in the PipQueue
            }
        }
Пример #2
0
        /// <summary>
        /// Runs pip asynchronously
        /// </summary>
        protected async Task RunCoreAsync(RunnablePip runnablePip)
        {
            DispatcherReleaser releaser = new DispatcherReleaser(this);

            try
            {
                // Unhandled exceptions (Catastrophic BuildXL Failures) during a pip's execution will be thrown here without an AggregateException.
                await runnablePip.RunAsync(releaser);
            }
            finally
            {
                releaser.Release();
                m_pipQueue.DecrementRunningOrQueuedPips(); // Trigger dispatching loop in the PipQueue
            }
        }