예제 #1
0
        /// <summary>
        /// This function is called when the task executes a callback via IBuildEngine interface. A thread
        /// that currently owns the workitem queue will continue to own it, unless a work item comes in while
        /// it is inside the callback. A thread that enters the callback no longer owns the current directory and
        /// environment block, but it will always regain them before returning to the task.
        /// </summary>
        /// <param name="nodeProxyId"></param>
        /// <param name="requestResults"></param>
        internal static void WaitForResults(int nodeProxyId, BuildResult[] requestResults)
        {
            TaskWorkerThread workerThread = TaskWorkerThread.GetWorkerThreadForProxyId(nodeProxyId);

            workerThread.NodeActionLoop(workerThread.threadActive ? NodeLoopExecutionMode.WaitingActiveThread :
                                        NodeLoopExecutionMode.WaitingPassiveThread,
                                        nodeProxyId, requestResults);
        }
예제 #2
0
        internal static void PostBuildResult(BuildResult buildResult)
        {
            TaskWorkerThread workerThread = TaskWorkerThread.GetWorkerThreadForProxyId(buildResult.NodeProxyId);

            lock (workerThread.targetEvaluationResults)
            {
                workerThread.targetEvaluationResults.AddLast(new LinkedListNode <BuildResult>(buildResult));
                workerThread.LocalDoneNoticeEvent.Set();
            }
        }