コード例 #1
0
ファイル: TaskHost.cs プロジェクト: hongli051/IronyTest
 /// <summary>
 /// Requests to yield the node.
 /// Thread safe, however Yield cannot be called unless the
 /// last call to Yield or Reaquire was Reaquire.
 /// </summary>
 public void Yield()
 {
     lock (_callbackMonitor)
     {
         IRequestBuilderCallback builderCallback = _requestEntry.Builder as IRequestBuilderCallback;
         ErrorUtilities.VerifyThrow(_yieldThreadId == -1, "Cannot call Yield() while yielding.");
         _yieldThreadId = Thread.CurrentThread.ManagedThreadId;
         builderCallback.Yield();
     }
 }
コード例 #2
0
ファイル: TaskHost.cs プロジェクト: RoguePointer80/msbuild
 /// <summary>
 /// Requests to yield the node.
 /// Thread safe, however Yield cannot be called unless the
 /// last call to Yield or Reacquire was Reacquire.
 /// </summary>
 public void Yield()
 {
     lock (_callbackMonitor)
     {
         IRequestBuilderCallback builderCallback = _requestEntry.Builder as IRequestBuilderCallback;
         ErrorUtilities.VerifyThrow(_yieldThreadId == -1, "Cannot call Yield() while yielding.");
         _yieldThreadId = Thread.CurrentThread.ManagedThreadId;
         MSBuildEventSource.Log.ExecuteTaskYieldStart(_taskLoggingContext.TaskName, _taskLoggingContext.BuildEventContext.TaskId);
         builderCallback.Yield();
     }
 }
コード例 #3
0
 /// <summary>
 /// Yields the node.
 /// </summary>
 void IRequestBuilderCallback.Yield()
 {
     _requestBuilderCallback.Yield();
 }